diff --git a/pep-0433.txt b/pep-0433.txt index 21f4a8e71..ca662348d 100644 --- a/pep-0433.txt +++ b/pep-0433.txt @@ -22,10 +22,25 @@ new file descriptor. Rationale ========= -XXX recap briefly what the close-on-exec flag does +A file descriptor has a close-on-exec flag which indicates if the file +descriptor will be inherited or not. -On UNIX, subprocess closes file descriptors greater than 2 by default -since Python 3.2 [#subprocess_close]_. All file descriptors created by +On UNIX, the file descriptor will be closed on the execution of child processes +if the close-on-exec flag is set, the file descriptor is inherited by child +processes if the flag is cleared. + +On Windows, the file descriptor is not inherited if the close-on-exec flag is +set, the file descriptor is inherited by child processes if the flag is cleared +and if ``CreateProcess()`` is called with the *bInheritHandles* parameter set +to ``TRUE`` (when ``subprocess.Popen`` is created with ``close_fds=False`` for +example). + + +Status in Python 3.3 +-------------------- + +On UNIX, the subprocess module closes file descriptors greater than 2 by +default since Python 3.2 [#subprocess_close]_. All file descriptors created by the parent process are automatically closed in the child process. ``xmlrpc.server.SimpleXMLRPCServer`` sets the close-on-exec flag of