All callers to this function MUST hold self._waitpid_lock.
(self, wait_flags)
| 2036 | |
| 2037 | |
| 2038 | def _try_wait(self, wait_flags): |
| 2039 | """All callers to this function MUST hold self._waitpid_lock.""" |
| 2040 | try: |
| 2041 | (pid, sts) = os.waitpid(self.pid, wait_flags) |
| 2042 | except ChildProcessError: |
| 2043 | # This happens if SIGCLD is set to be ignored or waiting |
| 2044 | # for child processes has otherwise been disabled for our |
| 2045 | # process. This child is dead, we can't get the status. |
| 2046 | pid = self.pid |
| 2047 | sts = 0 |
| 2048 | return (pid, sts) |
| 2049 | |
| 2050 | |
| 2051 | def _wait(self, timeout): |