[Python-Dev] PEP 433: Add cloexec argument to functions creating file descriptors

Nick Coghlan ncoghlan at gmail.com
Mon Jan 14 13:13:16 CET 2013


On Mon, Jan 14, 2013 at 9:23 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> I'm not sure that it's so different than the change on subprocess
> (close_fds=True by default on UNIX since Python 3.2). Do you think
> that it would break more applications?

Don't ignore the possible explanation that the intersection of the
sets "users with applications affected by that change" and "users
migrating to Python 3.x" may currently be close to zero.

> I disagree but I'm waiting other votes :-)

I'm a fan of the conservative approach, with an environment variable
and command line option to close FDs by default in 3.4 (similar to
PYTHONHASHSEED and -R in the pre-3.3 security releases), and the
cloexec/noinherit behaviour becoming the default (with no way to turn
it off globally) in 3.5.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list