MCPcopy Index your code
hub / github.com/python/cpython / wait

Method wait

Lib/subprocess.py:1327–1348  ·  view source on GitHub ↗

Wait for child process to terminate; returns self.returncode.

(self, timeout=None)

Source from the content-addressed store, hash-verified

1325
1326
1327 def wait(self, timeout=None):
1328 """Wait for child process to terminate; returns self.returncode."""
1329 if timeout is not None:
1330 endtime = _time() + timeout
1331 try:
1332 return self._wait(timeout=timeout)
1333 except KeyboardInterrupt:
1334 # https://bugs.python.org/issue25942
1335 # The first keyboard interrupt waits briefly for the child to
1336 # exit under the common assumption that it also received the ^C
1337 # generated SIGINT and will exit rapidly.
1338 if timeout is not None:
1339 sigint_timeout = min(self._sigint_wait_secs,
1340 self._remaining_time(endtime))
1341 else:
1342 sigint_timeout = self._sigint_wait_secs
1343 self._sigint_wait_secs = 0 # nothing else should wait.
1344 try:
1345 self._wait(timeout=sigint_timeout)
1346 except TimeoutExpired:
1347 pass
1348 raise # resume the KeyboardInterrupt
1349
1350 def _close_pipe_fds(self,
1351 p2cread, p2cwrite,

Callers 10

xcode_testFunction · 0.95
openMethod · 0.95
_invokeMethod · 0.95
openMethod · 0.95
__exit__Method · 0.95
communicateMethod · 0.95
_communicateMethod · 0.95
query_vcvarsallFunction · 0.95
callFunction · 0.45
runFunction · 0.45

Calls 2

_waitMethod · 0.95
_remaining_timeMethod · 0.95

Tested by

no test coverage detected