PEP 446: clarify the status of python 3.3 on Windows

Be more explicit
This commit is contained in:
Victor Stinner 2013-08-11 22:08:03 +02:00
parent 2f67e7cc67
commit a9dd5b6b82
1 changed files with 19 additions and 15 deletions

View File

@ -318,29 +318,31 @@ child process.
On Windows, the ``subprocess`` closes all handles and file descriptors On Windows, the ``subprocess`` closes all handles and file descriptors
in the child process by default. If at least one standard stream (stdin, in the child process by default. If at least one standard stream (stdin,
stdout or stderr) is replaced (ex: redirected into a pipe), all stdout or stderr) is replaced (ex: redirected into a pipe), all
inheritable handles are inherited in the child process. inheritable handles and file descriptors 0, 1 and 2 are inherited in the
child process.
All inheritable file descriptors are inherited by the child process Using the functions of the ``os.execv*()`` and ``os.spawn*()`` families,
using the functions of the ``os.execv*()`` and ``os.spawn*()`` families. all inheritable handles and all inheritable file descriptors are
inherited by the child process.
On UNIX, the ``multiprocessing`` module uses ``os.fork()`` and so all On UNIX, the ``multiprocessing`` module uses ``os.fork()`` and so all
file descriptors are inherited by child processes. file descriptors are inherited by child processes.
On Windows, all inheritable handles are inherited by the child process On Windows, all inheritable handles and file descriptors 0, 1 and 2 are
using the ``multiprocessing`` module, all file descriptors except inherited by the child process using the ``multiprocessing`` module, all
standard streams are closed. file descriptors except standard streams are closed.
Summary: Summary:
=========================== ============= ================== ============= =========================== ================ ================== =============
Module FD on UNIX Handles on Windows FD on Windows Module FD on UNIX Handles on Windows FD on Windows
=========================== ============= ================== ============= =========================== ================ ================== =============
subprocess, default STD, pass_fds none STD subprocess, default STD, pass_fds none STD
subprocess, replace stdout STD, pass_fds all STD subprocess, replace stdout STD, pass_fds all STD
subprocess, close_fds=False all all STD subprocess, close_fds=False all all STD
multiprocessing all all STD multiprocessing (not applicable) all STD
os.execv(), os.spawn() all all all os.execv(), os.spawn() all all all
=========================== ============= ================== ============= =========================== ================ ================== =============
Legend: Legend:
@ -351,6 +353,8 @@ Legend:
inherited in the child process inherited in the child process
* "pass_fds": file descriptors of the *pass_fds* parameter of the * "pass_fds": file descriptors of the *pass_fds* parameter of the
subprocess are inherited subprocess are inherited
* "(not applicable)": on UNIX, the multiprocessing uses ``fork()``,
so this case is not concerned by this PEP.
Performances of Closing All File Descriptors Performances of Closing All File Descriptors