
python-checkins at python
Aug 11, 2013, 1:08 PM
Post #1 of 1
(7 views)
Permalink
|
|
peps: PEP 446: clarify the status of python 3.3 on Windows
|
|
http://hg.python.org/peps/rev/f7ff2b1e3a74 changeset: 5051:f7ff2b1e3a74 user: Victor Stinner <victor.stinner [at] gmail> date: Sun Aug 11 22:08:03 2013 +0200 summary: PEP 446: clarify the status of python 3.3 on Windows Be more explicit files: pep-0446.txt | 34 +++++++++++++++++++--------------- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git a/pep-0446.txt b/pep-0446.txt --- a/pep-0446.txt +++ b/pep-0446.txt @@ -318,29 +318,31 @@ On Windows, the ``subprocess`` closes all handles and file descriptors in the child process by default. If at least one standard stream (stdin, 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 file descriptors are inherited by child processes. -On Windows, all inheritable handles are inherited by the child process -using the ``multiprocessing`` module, all file descriptors except -standard streams are closed. +On Windows, all inheritable handles and file descriptors 0, 1 and 2 are +inherited by the child process using the ``multiprocessing`` module, all +file descriptors except standard streams are closed. Summary: -=========================== ============= ================== ============= -Module FD on UNIX Handles on Windows FD on Windows -=========================== ============= ================== ============= -subprocess, default STD, pass_fds none STD -subprocess, replace stdout STD, pass_fds all STD -subprocess, close_fds=False all all STD -multiprocessing all all STD -os.execv(), os.spawn() all all all -=========================== ============= ================== ============= +=========================== ================ ================== ============= +Module FD on UNIX Handles on Windows FD on Windows +=========================== ================ ================== ============= +subprocess, default STD, pass_fds none STD +subprocess, replace stdout STD, pass_fds all STD +subprocess, close_fds=False all all STD +multiprocessing (not applicable) all STD +os.execv(), os.spawn() all all all +=========================== ================ ================== ============= Legend: @@ -351,6 +353,8 @@ inherited in the child process * "pass_fds": file descriptors of the *pass_fds* parameter of the 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 -- Repository URL: http://hg.python.org/peps
|