Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Doc/library/asyncio-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ DatagramTransport
called with :const:`None` as its argument.


BaseSubprocessTransport
-----------------------
SubprocessTransport
-------------------

.. class:: BaseSubprocessTransport
.. class:: SubprocessTransport

.. method:: get_pid()

Expand Down Expand Up @@ -290,15 +290,14 @@ BaseSubprocessTransport
.. method:: terminate()

Ask the subprocess to stop, as in :meth:`subprocess.Popen.terminate`.
This method is an alias for the :meth:`close` method.

On POSIX systems, this method sends SIGTERM to the subprocess.
On Windows, the Windows API function TerminateProcess() is called to
stop the subprocess.

.. method:: close()

Ask the subprocess to stop by calling the :meth:`terminate` method if the
Ask the subprocess to stop by calling the :meth:`kill` method if the
subprocess hasn't returned yet, and close transports of all pipes
(*stdin*, *stdout* and *stderr*).

Expand Down
6 changes: 4 additions & 2 deletions Doc/library/asyncio-subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ Run subprocesses asynchronously using the :mod:`subprocess` module.
*shell*, which should not be specified at all.

Returns a pair of ``(transport, protocol)``, where *transport* is an
instance of :class:`BaseSubprocessTransport`.
instance of :class:`SubprocessTransport` and *protocol* is an object
instantiated by the *protocol_factory*.

This method is a :ref:`coroutine <coroutine>`.

Expand All @@ -132,7 +133,8 @@ Run subprocesses asynchronously using the :mod:`subprocess` module.
the remaining arguments.

Returns a pair of ``(transport, protocol)``, where *transport* is an
instance of :class:`BaseSubprocessTransport`.
instance of :class:`SubprocessTransport` and *protocol* is an object
instantiated by the *protocol_factory*.

It is the application's responsibility to ensure that all whitespace and
metacharacters are quoted appropriately to avoid `shell injection
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix wrong class name: asyncio.BaseSubprocessTransport -> SubprocessTransport,
and clarify return objects descriptions of AbstractEventLoop.subprocess_exec().
Fixed the description of SubprocessTransport.close().