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)
| 1575 | _winapi.CloseHandle(ht) |
| 1576 | |
| 1577 | def _internal_poll(self, _deadstate=None, |
| 1578 | _WaitForSingleObject=_winapi.WaitForSingleObject, |
| 1579 | _WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0, |
| 1580 | _GetExitCodeProcess=_winapi.GetExitCodeProcess): |
| 1581 | """Check if child process has terminated. Returns returncode |
| 1582 | attribute. |
| 1583 | |
| 1584 | This method is called by __del__, so it can only refer to objects |
| 1585 | in its local scope. |
| 1586 | |
| 1587 | """ |
| 1588 | if self.returncode is None: |
| 1589 | if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0: |
| 1590 | self.returncode = _GetExitCodeProcess(self._handle) |
| 1591 | return self.returncode |
| 1592 | |
| 1593 | |
| 1594 | def _wait(self, timeout): |