Skip to content

Commit 33c8b1f

Browse files
committed
Minor rewordings
1 parent 3c92c1d commit 33c8b1f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Lib/subprocess.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ def _wait_kqueue(self, timeout):
21552155
else:
21562156
if not events:
21572157
raise TimeoutExpired(self.args, timeout)
2158-
return True
2158+
return True
21592159
finally:
21602160
kq.close()
21612161

@@ -2178,8 +2178,8 @@ def _wait(self, timeout):
21782178
# Try efficient wait first.
21792179
if self._wait_pidfd(timeout) or self._wait_kqueue(timeout):
21802180
# Process is gone. At this point os.waitpid(pid, 0)
2181-
# will return immediately, but in rare races the
2182-
# PID may have been reused.
2181+
# will return immediately, but in very rare races
2182+
# the PID may have been reused.
21832183
# os.waitpid(pid, WNOHANG) ensures we attempt a
21842184
# non-blocking reap without blocking indefinitely.
21852185
with self._waitpid_lock:

Misc/NEWS.d/next/Library/2026-01-19-16-45-16.gh-issue-83069.0TaeH9.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
event-driven mechanism now waits for process termination, if available. Linux
33
≥= 5.3 uses :func:`os.pidfd_open` + :func:`select.poll`. macOS and other BSD
44
variants use :func:`select.kqueue` + ``KQ_FILTER_PROC`` + ``KQ_NOTE_EXIT``.
5-
Windows keeps using ``WaitForSingleObject`` (unchanged) If none of these
5+
Windows keeps using ``WaitForSingleObject`` (unchanged). If none of these
66
mechanisms are available, the function falls back to the traditional busy loop
77
(non-blocking call and short sleeps). Patch by Giampaolo Rodola.

0 commit comments

Comments
 (0)