diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-10-13 21:56:43 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-10-13 21:56:43 (GMT) |
commit | 4270a24dd98dc2d67418958adada67191b6cdc43 (patch) | |
tree | d946257be57e4ff4315c7bac0ac74d37e4120161 /Doc/library | |
parent | e6f8c5025afd9f88844a80ec03d61290ef5ef2d1 (diff) | |
download | cpython-4270a24dd98dc2d67418958adada67191b6cdc43.zip cpython-4270a24dd98dc2d67418958adada67191b6cdc43.tar.gz cpython-4270a24dd98dc2d67418958adada67191b6cdc43.tar.bz2 |
asyncio doc: document BaseSubprocessTransport.close() method
Modify also the get_pipe_transport() doc to mention explicitly the supported
file descriptors.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/asyncio-protocol.rst | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 2e1218d..3f9a2c7 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -207,10 +207,15 @@ BaseSubprocessTransport .. method:: get_pipe_transport(fd) Return the transport for the communication pipe corresponding to the - integer file descriptor *fd*. The return value can be a readable or - writable streaming transport, depending on the *fd*. If *fd* doesn't - correspond to a pipe belonging to this transport, :const:`None` is - returned. + integer file descriptor *fd*: + + * ``0``: readable streaming transport of the standard input (*stdin*), + or :const:`None` if the subprocess was not created with ``stdin=PIPE`` + * ``1``: writable streaming transport of the standard output (*stdout*), + or :const:`None` if the subprocess was not created with ``stdout=PIPE`` + * ``2``: writable streaming transport of the standard error (*stderr*), + or :const:`None` if the subprocess was not created with ``stderr=PIPE`` + * other *fd*: :const:`None` .. method:: get_returncode() @@ -239,6 +244,12 @@ BaseSubprocessTransport 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 + subprocess hasn't returned yet, and close transports of all pipes + (*stdin*, *stdout* and *stderr*). + .. _asyncio-protocol: |