MCPcopy Index your code
hub / github.com/python/cpython / _try_wait

Method _try_wait

Lib/subprocess.py:2092–2102  ·  view source on GitHub ↗

All callers to this function MUST hold self._waitpid_lock.

(self, wait_flags)

Source from the content-addressed store, hash-verified

2090
2091
2092 def _try_wait(self, wait_flags):
2093 """All callers to this function MUST hold self._waitpid_lock."""
2094 try:
2095 (pid, sts) = os.waitpid(self.pid, wait_flags)
2096 except ChildProcessError:
2097 # This happens if SIGCLD is set to be ignored or waiting
2098 # for child processes has otherwise been disabled for our
2099 # process. This child is dead, we can't get the status.
2100 pid = self.pid
2101 sts = 0
2102 return (pid, sts)
2103
2104 def _wait_pidfd(self, timeout):
2105 """Wait for PID to terminate using pidfd_open() + poll().

Callers 1

_waitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected