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

Clarify the subprocess documentation.
This commit is contained in:
Gregory P. Smith 2018-03-25 10:27:59 -07:00 committed by GitHub
parent a9e5d0e9ef
commit dfb6e54dd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -459,7 +459,10 @@ functions.
common use of *preexec_fn* to call os.setsid() in the child. 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 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 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 child process unless explicitly passed in the ``handle_list`` element of
:attr:`STARTUPINFO.lpAttributeList`, or by standard handle redirection. :attr:`STARTUPINFO.lpAttributeList`, or by standard handle redirection.