MCPcopy Create free account
hub / github.com/EasyIME/PIME / _try_cleanup_process

Method _try_cleanup_process

python/python3/tornado/process.py:346–355  ·  view source on GitHub ↗
(cls, pid: int)

Source from the content-addressed store, hash-verified

344
345 @classmethod
346 def _try_cleanup_process(cls, pid: int) -> None:
347 try:
348 ret_pid, status = os.waitpid(pid, os.WNOHANG) # type: ignore
349 except ChildProcessError:
350 return
351 if ret_pid == 0:
352 return
353 assert ret_pid == pid
354 subproc = cls._waiting.pop(pid)
355 subproc.io_loop.add_callback_from_signal(subproc._set_returncode, status)
356
357 def _set_returncode(self, status: int) -> None:
358 if sys.platform == "win32":

Callers 2

set_exit_callbackMethod · 0.80
_cleanupMethod · 0.80

Calls 1

Tested by

no test coverage detected