PEP 446: change os.dup2()

This commit is contained in:
Victor Stinner 2013-08-11 22:57:36 +02:00
parent aed11c8530
commit 8dbcf87357
1 changed files with 1 additions and 2 deletions

View File

@ -450,8 +450,7 @@ Other Changes
flag of file descriptors is unchanged in the parent process. flag of file descriptors is unchanged in the parent process.
* ``os.dup2(fd, fd2)`` makes *fd2* inheritable if *fd2* is ``0`` * ``os.dup2(fd, fd2)`` makes *fd2* inheritable if *fd2* is ``0``
(stdin), ``1`` (stdout) or ``2`` (stderr) and *fd2* is different than (stdin), ``1`` (stdout) or ``2`` (stderr).
*fd*.
Since Python should only create non-inheritable file descriptors, it is Since Python should only create non-inheritable file descriptors, it is
safe to use subprocess with the *close_fds* parameter set to ``False``. safe to use subprocess with the *close_fds* parameter set to ``False``.