MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _internal_poll

Method _internal_poll

tools/python-3.11.9-amd64/Lib/subprocess.py:1563–1577  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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):

Callers 3

__del__Method · 0.95
pollMethod · 0.95
_cleanupFunction · 0.80

Calls 3

_handle_exitstatusMethod · 0.95
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected