MCPcopy Index your code
hub / github.com/RustPython/RustPython / wait

Method wait

Lib/subprocess.py:1273–1294  ·  view source on GitHub ↗

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

(self, timeout=None)

Source from the content-addressed store, hash-verified

1271
1272
1273 def wait(self, timeout=None):
1274 """Wait for child process to terminate; returns self.returncode."""
1275 if timeout is not None:
1276 endtime = _time() + timeout
1277 try:
1278 return self._wait(timeout=timeout)
1279 except KeyboardInterrupt:
1280 # https://bugs.python.org/issue25942
1281 # The first keyboard interrupt waits briefly for the child to
1282 # exit under the common assumption that it also received the ^C
1283 # generated SIGINT and will exit rapidly.
1284 if timeout is not None:
1285 sigint_timeout = min(self._sigint_wait_secs,
1286 self._remaining_time(endtime))
1287 else:
1288 sigint_timeout = self._sigint_wait_secs
1289 self._sigint_wait_secs = 0 # nothing else should wait.
1290 try:
1291 self._wait(timeout=sigint_timeout)
1292 except TimeoutExpired:
1293 pass
1294 raise # resume the KeyboardInterrupt
1295
1296 def _close_pipe_fds(self,
1297 p2cread, p2cwrite,

Callers 8

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

Calls 4

_waitMethod · 0.95
_remaining_timeMethod · 0.95
_timeFunction · 0.90
minFunction · 0.85

Tested by

no test coverage detected