(cls, pid: int)
| 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": |
no test coverage detected