summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorLuis Pedro Coelho <luis@luispedro.org>2023-11-16 13:04:46 (GMT)
committerGitHub <noreply@github.com>2023-11-16 13:04:46 (GMT)
commit81ab0e8a4add53035c87b040afda6d554cace528 (patch)
tree3de0aba0d4e757c82d8ff4aa6c28531452fba596 /Doc
parent985679f05d1b72965bfbed99d1499c22815375e4 (diff)
downloadcpython-81ab0e8a4add53035c87b040afda6d554cace528.zip
cpython-81ab0e8a4add53035c87b040afda6d554cace528.tar.gz
cpython-81ab0e8a4add53035c87b040afda6d554cace528.tar.bz2
[doc] Make subprocess.wait documentation more precise (#98700)
[doc] Make subprocess.wait doc more precise An active loop is only used when the `timeout` parameter is used on POSIX. When no timeout is used, the code calls `os.waitpid` internally (which puts the process on a sleep status). On Windows, the internal Windows API call accepts a timeout parameter, so that is delegated to the OS.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/subprocess.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index 7f22a5d..d6b892a 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -791,9 +791,10 @@ Instances of the :class:`Popen` class have the following methods:
.. note::
- The function is implemented using a busy loop (non-blocking call and
- short sleeps). Use the :mod:`asyncio` module for an asynchronous wait:
- see :class:`asyncio.create_subprocess_exec`.
+ When the ``timeout`` parameter is not ``None``, then (on POSIX) the
+ function is implemented using a busy loop (non-blocking call and short
+ sleeps). Use the :mod:`asyncio` module for an asynchronous wait: see
+ :class:`asyncio.create_subprocess_exec`.
.. versionchanged:: 3.3
*timeout* was added.