We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ee771b commit 61c6b99Copy full SHA for 61c6b99
1 file changed
Lib/subprocess.py
@@ -2157,13 +2157,7 @@ def _wait(self, timeout):
2157
if timeout < 0:
2158
raise TimeoutExpired(self.args, timeout)
2159
if self._wait_pidfd(timeout) or self._wait_kqueue(timeout):
2160
- # At this point os.waitpid(pid, 0) should return
2161
- # immediately, but in rare races another thread or
2162
- # signal handler may have already reaped the PID.
2163
- # Using _busy_wait(0) (WNOHANG) ensures we attempt
2164
- # a non-blocking reap safely without blocking
2165
- # indefinitely.
2166
- self._busy_wait(0)
+ self._blocking_wait()
2167
else:
2168
self._busy_wait(timeout)
2169
0 commit comments