All callers to this function MUST hold self._waitpid_lock.
(self, wait_flags)
| 2006 | |
| 2007 | |
| 2008 | def _try_wait(self, wait_flags): |
| 2009 | """All callers to this function MUST hold self._waitpid_lock.""" |
| 2010 | try: |
| 2011 | (pid, sts) = os.waitpid(self.pid, wait_flags) |
| 2012 | except ChildProcessError: |
| 2013 | # This happens if SIGCLD is set to be ignored or waiting |
| 2014 | # for child processes has otherwise been disabled for our |
| 2015 | # process. This child is dead, we can't get the status. |
| 2016 | pid = self.pid |
| 2017 | sts = 0 |
| 2018 | return (pid, sts) |
| 2019 | |
| 2020 | |
| 2021 | def _wait(self, timeout): |