Check if child process has terminated. Returns returncode attribute. This method is called by __del__, so it can only refer to objects in its local scope.
(self, _deadstate=None,
_WaitForSingleObject=_winapi.WaitForSingleObject,
_WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0,
_GetExitCodeProcess=_winapi.GetExitCodeProcess)
| 1629 | _winapi.CloseHandle(ht) |
| 1630 | |
| 1631 | def _internal_poll(self, _deadstate=None, |
| 1632 | _WaitForSingleObject=_winapi.WaitForSingleObject, |
| 1633 | _WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0, |
| 1634 | _GetExitCodeProcess=_winapi.GetExitCodeProcess): |
| 1635 | """Check if child process has terminated. Returns returncode |
| 1636 | attribute. |
| 1637 | |
| 1638 | This method is called by __del__, so it can only refer to objects |
| 1639 | in its local scope. |
| 1640 | |
| 1641 | """ |
| 1642 | if self.returncode is None: |
| 1643 | if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0: |
| 1644 | self.returncode = _GetExitCodeProcess(self._handle) |
| 1645 | return self.returncode |
| 1646 | |
| 1647 | |
| 1648 | def _wait(self, timeout): |