[Python-Dev] PEP 446: Open issues/questions

Victor Stinner victor.stinner at gmail.com
Tue Jul 30 11:37:56 CEST 2013


Le 30 juil. 2013 09:11, "Charles-François Natali" <cf.natali at gmail.com> a
écrit :
> > Perhaps this advocates for a global flag, e.g.
> > sys.set_default_fd_inheritance(), with False (non-inheritable) being
> > the default for sanity and security.
>
> This looks more and more like PEP 433 :-)

I don't like the global modifiable default, for the reasons Charles
Francois gave some months ago.

I did have time yet to rewrite the PEP 446, I'm writing first its
implementation. Basically, the new PEP 446 is:

- functions creating file descriptors and Windows handle now clear the
inheritable flag (disable inheritance by default)
- add new functions os.get/set_inheritable()
- subprocess makes fds of pass_fds inheritable
- (maybe) os.dup2(fd, fd2) makes fd2 inheritable for fd 0, 1, 2

That's all! No more new cloexec parameter to +15 functions and classes, no
more global variable (default inheritavle values).

Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130730/71782725/attachment-0001.html>


More information about the Python-Dev mailing list