summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2018-03-25 17:27:59 (GMT)
committerGitHub <noreply@github.com>2018-03-25 17:27:59 (GMT)
commitdfb6e54dd8dbd735f55109ad8ee9dfcb6178ede9 (patch)
tree8a6bb440969a8a5f4d19a6aaf68549d7758694b8 /Doc
parenta9e5d0e9ef27b14e34631d415e727a07d0f63bef (diff)
downloadcpython-dfb6e54dd8dbd735f55109ad8ee9dfcb6178ede9.zip
cpython-dfb6e54dd8dbd735f55109ad8ee9dfcb6178ede9.tar.gz
cpython-dfb6e54dd8dbd735f55109ad8ee9dfcb6178ede9.tar.bz2
Clarify fd inheritance when close_fds=False. (GH-6240)
Clarify the subprocess documentation.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/subprocess.rst5
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index db7a88a..fbf2c3d 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.