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

Method wait

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

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

(self, timeout=None)

Source from the content-addressed store, hash-verified

1257
1258
1259 def wait(self, timeout=None):
1260 """Wait for child process to terminate; returns self.returncode."""
1261 if timeout is not None:
1262 endtime = _time() + timeout
1263 try:
1264 return self._wait(timeout=timeout)
1265 except KeyboardInterrupt:
1266 # https://bugs.python.org/issue25942
1267 # The first keyboard interrupt waits briefly for the child to
1268 # exit under the common assumption that it also received the ^C
1269 # generated SIGINT and will exit rapidly.
1270 if timeout is not None:
1271 sigint_timeout = min(self._sigint_wait_secs,
1272 self._remaining_time(endtime))
1273 else:
1274 sigint_timeout = self._sigint_wait_secs
1275 self._sigint_wait_secs = 0 # nothing else should wait.
1276 try:
1277 self._wait(timeout=sigint_timeout)
1278 except TimeoutExpired:
1279 pass
1280 raise # resume the KeyboardInterrupt
1281
1282 def _close_pipe_fds(self,
1283 p2cread, p2cwrite,

Callers 10

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

Calls 3

_waitMethod · 0.95
_remaining_timeMethod · 0.95
minFunction · 0.85

Tested by

no test coverage detected