Re: [Python-Dev] PEP 433: second try

2013年1月30日 04:41:52 -0800

On 01/30/2013 01:00 PM, Victor Stinner wrote:
Disable inheritance by default
(...)
* It violates the principle of least surprise. Developers using the
 os module may expect that Python respects the POSIX standard and so
 that close-on-exec flag is not set by default.
Oh, I just saw that Perl is "violating POSIX" since Perl 1:
close-on-exec flag in set on new created file descriptors if their
number is greater than $SYSTEM_FD_MAX (which is usually 2).
I haven't checked the source, but I suspect this applies only to file descriptors opened with open(), not to explicit POSIX::* calls. (The documentation of the latter doesn't mention close-on-exec at all.) Perl's open() contains functionality equivalent to Python's open() and subprocess.Popen(), the latter of which already closes on exec by default.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to