Message179428
> "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). |
|
Date |
User |
Action |
Args |
2013-01-09 09:38:29 | neologix | set | recipients:
+ neologix, gregory.p.smith, pitrou, vstinner, nadeem.vawda, Christophe.Devriese |
2013-01-09 09:38:29 | neologix | link | issue12107 messages |
2013-01-09 09:38:29 | neologix | create | |
|