File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -807,7 +807,8 @@ Instances of the :class:`Popen` class have the following methods:
807807 waits for process termination when available:
808808
809809 - Linux ≥5.3 uses :func: `os.pidfd_open ` + :func: `select.poll `
810- - macOS and other BSD variants use :func: `select.kqueue `
810+ - macOS and other BSD variants use :func: `select.kqueue ` +
811+ ``KQ_FILTER_PROC `` + ``KQ_NOTE_EXIT ``
811812 - Windows uses ``WaitForSingleObject ``
812813
813814 If none of these mechanisms are available, the function falls back to a
@@ -819,7 +820,8 @@ Instances of the :class:`Popen` class have the following methods:
819820 *timeout * was added.
820821
821822 .. versionchanged :: 3.15
822- use efficient event-driven implementation on Linux >= 5.3 and macOS / BSD.
823+ if *timeout * is not ``None ``, use efficient event-driven implementation
824+ on Linux >= 5.3 and macOS / BSD.
823825
824826.. method :: Popen.communicate(input=None, timeout=None)
825827
Original file line number Diff line number Diff line change 1+ :meth: `subprocess.Popen.wait `: when ``timeout `` is not ``None ``, an efficient
2+ event-driven mechanism now waits for process termination, if available:
3+
4+ - Linux ≥5.3 uses :func: `os.pidfd_open ` + :func: `select.poll `
5+ - macOS and other BSD variants use :func: `select.kqueue ` + ``KQ_FILTER_PROC `` +
6+ ``KQ_NOTE_EXIT ``
7+ - Windows keep using ``WaitForSingleObject `` (unchanged)
8+
9+ If none of these mechanisms are available, the function falls back to the
10+ traditional busy loop (non-blocking call and short sleeps).
11+
12+ Patch by Giampaolo Rodola.
You can’t perform that action at this time.
0 commit comments