Author neologix
Recipients Christophe.Devriese, gregory.p.smith, nadeem.vawda, neologix, pitrou, vstinner
Date 2013-01-09.09:38:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAH_1eM2NwdynK-NP9zH8ybMt0+hAWh5s3F0vyfBKu93rbaLuxA@mail.gmail.com>
In-reply-to <1357687560.69.0.936289086978.issue12107@psf.upfronthosting.co.za>
Content
> "I realize this bugreport cannot fix 35 years of a bad design decision in linux."
>
> Well... Ruby made a brave choice :-) Ruby (2.0?) does set
> close-on-exec flag on *ALL file descriptors (except 0, 1, 2) *by
> default*:
> http://bugs.ruby-lang.org/issues/5041
>
> This change solves the problem of having to close all file descriptor
> after a fork to run a new program (see closed Python issues #11284 and
> #8052)... if you are not using C extensions creating file descriptors?

> "But we can't simply change the default to FD_CLOEXEC, for two reasons:
> - we can't silently change the Unix semantics
> - this is going to break some applications: for example, FD inherited across exec is used by super servers such as inetd, and there are others very legitimate uses"
>
> Yes, changing the default value of the flag (enable close-on-exec by default) will break some applications. But if we chose to do it, developers of these applications can still disable close-on-exec (because the option must be configurable) to fix their application for Python 3.4.

Changing all FDs to close-on-exec by default would be a bold move (and
even just for SocketServer).
It ought to be default, but it's going to break some applications.
That's definitely something which needs discussion (at not only on the
tracker, I would could bring it up on python-dev).
History
Date User Action Args
2013-01-09 09:38:29neologixsetrecipients: + neologix, gregory.p.smith, pitrou, vstinner, nadeem.vawda, Christophe.Devriese
2013-01-09 09:38:29neologixlinkissue12107 messages
2013-01-09 09:38:29neologixcreate