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)
| 1561 | _winapi.CloseHandle(ht) |
| 1562 | |
| 1563 | def _internal_poll(self, _deadstate=None, |
| 1564 | _WaitForSingleObject=_winapi.WaitForSingleObject, |
| 1565 | _WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0, |
| 1566 | _GetExitCodeProcess=_winapi.GetExitCodeProcess): |
| 1567 | """Check if child process has terminated. Returns returncode |
| 1568 | attribute. |
| 1569 | |
| 1570 | This method is called by __del__, so it can only refer to objects |
| 1571 | in its local scope. |
| 1572 | |
| 1573 | """ |
| 1574 | if self.returncode is None: |
| 1575 | if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0: |
| 1576 | self.returncode = _GetExitCodeProcess(self._handle) |
| 1577 | return self.returncode |
| 1578 | |
| 1579 | |
| 1580 | def _wait(self, timeout): |