[Python-checkins] Clarify fd inheritance when close_fds=False. (GH-6240)

Miss Islington (bot) webhook-mailer at python.org
Sun Mar 25 13:40:41 EDT 2018


https://github.com/python/cpython/commit/bc3e009f652e12f063c781cd1cec25ef71e00a7b
commit: bc3e009f652e12f063c781cd1cec25ef71e00a7b
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-03-25T10:40:38-07:00
summary:

Clarify fd inheritance when close_fds=False. (GH-6240)


Clarify the subprocess documentation.
(cherry picked from commit dfb6e54dd8dbd735f55109ad8ee9dfcb6178ede9)

Co-authored-by: Gregory P. Smith <greg at krypto.org>

files:
M Doc/library/subprocess.rst

diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index db7a88af6bea..fbf2c3d9fac9 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -459,7 +459,10 @@ functions.
       common use of *preexec_fn* to call os.setsid() in the child.
 
    If *close_fds* is true, all file descriptors except :const:`0`, :const:`1` and
-   :const:`2` will be closed before the child process is executed.
+   :const:`2` will be closed before the child process is executed.  Otherwise
+   when *close_fds* is false, file descriptors obey their inheritable flag
+   as described in :ref:`fd_inheritance`.
+
    On Windows, if *close_fds* is true then no handles will be inherited by the
    child process unless explicitly passed in the ``handle_list`` element of
    :attr:`STARTUPINFO.lpAttributeList`, or by standard handle redirection.



More information about the Python-checkins mailing list