Skip to content

Commit 81275c8

Browse files
committed
Update comment
1 parent 4359b07 commit 81275c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/subprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,13 +2125,13 @@ def _wait(self, timeout):
21252125
# Try efficient wait first.
21262126
if self._wait_pidfd(timeout) or self._wait_kqueue(timeout):
21272127
# Process is gone. At this point os.waitpid(pid, 0)
2128-
# should return immediately, but in rare races the
2129-
# PID may have been reused.
2128+
# will return immediately, but in very rare races
2129+
# the PID may have been reused.
21302130
# os.waitpid(pid, WNOHANG) ensures we attempt a
21312131
# non-blocking reap without blocking indefinitely.
21322132
with self._waitpid_lock:
21332133
if self.returncode is not None:
2134-
return self.returncode
2134+
return self.returncode # Another thread waited.
21352135
(pid, sts) = self._try_wait(os.WNOHANG)
21362136
assert pid == self.pid or pid == 0
21372137
if pid == self.pid:

0 commit comments

Comments
 (0)