PEP 446: On Windows, the close-on-exec flag is the *inverse* of HANDLE_FLAG_INHERIT

This commit is contained in:
Victor Stinner 2013-07-17 12:48:58 +02:00
parent da726ba476
commit ab9b8a51bf
1 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ The inheritance of file descriptors in child processes can be configured
on each file descriptor using a *close-on-exec* flag. By default, the on each file descriptor using a *close-on-exec* flag. By default, the
close-on-exec flag is not set. close-on-exec flag is not set.
On Windows, the close-on-exec flag is ``HANDLE_FLAG_INHERIT``. File On Windows, the close-on-exec flag is the inverse of ``HANDLE_FLAG_INHERIT``. File
descriptors are not inherited if the ``bInheritHandles`` parameter of descriptors are not inherited if the ``bInheritHandles`` parameter of
the ``CreateProcess()`` function is ``FALSE``, even if the the ``CreateProcess()`` function is ``FALSE``, even if the
``HANDLE_FLAG_INHERIT`` flag is set. If ``bInheritHandles`` is ``TRUE``, ``HANDLE_FLAG_INHERIT`` flag is set. If ``bInheritHandles`` is ``TRUE``,
@ -149,7 +149,7 @@ Other Changes
The ``subprocess.Popen`` class must clear the close-on-exec flag of file The ``subprocess.Popen`` class must clear the close-on-exec flag of file
descriptors of the ``pass_fds`` parameter. The flag is cleared in the descriptors of the ``pass_fds`` parameter. The flag is cleared in the
child process before executing the program, the change does not change child process before executing the program; the change does not change
the flag in the parent process. the flag in the parent process.
The close-on-exec flag must also be set on private file descriptors and The close-on-exec flag must also be set on private file descriptors and