mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Merge heads
This commit is contained in:
commit
dda926e657
2 changed files with 8 additions and 2 deletions
|
@ -8,14 +8,14 @@ Create a subprocess
|
||||||
|
|
||||||
.. function:: create_subprocess_shell(cmd, stdin=None, stdout=None, stderr=None, loop=None, limit=None, \*\*kwds)
|
.. function:: create_subprocess_shell(cmd, stdin=None, stdout=None, stderr=None, loop=None, limit=None, \*\*kwds)
|
||||||
|
|
||||||
Run the shell command *cmd* given as a string. Return a :class:`Process`
|
Run the shell command *cmd* given as a string. Return a :class:`~asyncio.subprocess.Process`
|
||||||
instance.
|
instance.
|
||||||
|
|
||||||
This function returns a :ref:`coroutine object <coroutine>`.
|
This function returns a :ref:`coroutine object <coroutine>`.
|
||||||
|
|
||||||
.. function:: create_subprocess_exec(\*args, stdin=None, stdout=None, stderr=None, loop=None, limit=None, \*\*kwds)
|
.. function:: create_subprocess_exec(\*args, stdin=None, stdout=None, stderr=None, loop=None, limit=None, \*\*kwds)
|
||||||
|
|
||||||
Create a subprocess. Return a :class:`Process` instance.
|
Create a subprocess. Return a :class:`~asyncio.subprocess.Process` instance.
|
||||||
|
|
||||||
This function returns a :ref:`coroutine object <coroutine>`.
|
This function returns a :ref:`coroutine object <coroutine>`.
|
||||||
|
|
||||||
|
|
|
@ -629,6 +629,12 @@ Instances of the :class:`Popen` class have the following methods:
|
||||||
:exc:`TimeoutExpired` exception. It is safe to catch this exception and
|
:exc:`TimeoutExpired` exception. It is safe to catch this exception and
|
||||||
retry the wait.
|
retry the wait.
|
||||||
|
|
||||||
|
.. 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`.
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|
||||||
This will deadlock when using ``stdout=PIPE`` and/or
|
This will deadlock when using ``stdout=PIPE`` and/or
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue