Skip to content

Commit 167590b

Browse files
committed
bpo-19764: Add some extra documentation about handle_list
1 parent 0e60d28 commit 167590b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Doc/library/subprocess.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,19 @@ on Windows.
812812
Sequence of handles that will be inherited. *close_fds* must be true if
813813
non-empty.
814814

815+
The handles must be made inheritable by
816+
:func:`os.set_handle_inheritable` or :class:`OSError` will be raised
817+
with Windows error `ERROR_INVALID_PARAMETER` (87). They only have to be
818+
inheritable during the process creation and can be made non-inheritable
819+
right afterwards.
820+
821+
Note that inheritable handles can be inherited by any process created
822+
that is set to inherit all handles. Other process creation functions
823+
might not be using an explicit handle list to avoid inheriting all
824+
handles like subprocess does, so you should be careful in using them
825+
when you have handles marked as inheritable. Also note that standard
826+
handles redirection requires creating inheritable handles temporarily.
827+
815828
.. versionadded:: 3.7
816829

817830
Constants

0 commit comments

Comments
 (0)