MCPcopy Index your code
hub / github.com/RustPython/RustPython / process_request

Method process_request

Lib/socketserver.py:615–638  ·  view source on GitHub ↗

Fork a new subprocess to process the request.

(self, request, client_address)

Source from the content-addressed store, hash-verified

613 self.collect_children()
614
615 def process_request(self, request, client_address):
616 """Fork a new subprocess to process the request."""
617 pid = os.fork()
618 if pid:
619 # Parent process
620 if self.active_children is None:
621 self.active_children = set()
622 self.active_children.add(pid)
623 self.close_request(request)
624 return
625 else:
626 # Child process.
627 # This must never return, hence os._exit()!
628 status = 1
629 try:
630 self.finish_request(request, client_address)
631 status = 0
632 except Exception:
633 self.handle_error(request, client_address)
634 finally:
635 try:
636 self.shutdown_request(request)
637 finally:
638 os._exit(status)
639
640 def server_close(self):
641 super().server_close()

Callers

nothing calls this directly

Calls 7

setFunction · 0.85
addMethod · 0.45
close_requestMethod · 0.45
finish_requestMethod · 0.45
handle_errorMethod · 0.45
shutdown_requestMethod · 0.45
_exitMethod · 0.45

Tested by

no test coverage detected