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

Jeff Allen "ja...py" at farowl.co.uk
Sun Jan 13 10:58:47 CET 2013


On 13/01/2013 00:41, Victor Stinner wrote:
>> PEP: 433
>> Title: Add cloexec argument to functions creating file descriptors
>> Status: Draft
> The PEP is still a draft. I'm sending it to python-dev to get a first review.
>
> The main question is the choice between the 3 different options:
>
>   * don't set close-on-exec flag by default
>   * always set close-on-exec flag
>   * add sys.setdefaultcloexec() to leave the choice to the application
>
> Victor
Nice clear explanation.

I think io, meaning _io and _pyio really, would be amongst the impacted 
modules, and should perhaps be in the examples. (I am currently working 
on the Jython implementation of the _io module.) It seems to me that 
io.open, and probably all the constructors, such as _io.FileIO, would 
need the extra information as a mode or a boolean argument like closefd. 
This may be a factor in your choice above.

Other things I noticed were minor, and I infer that they should wait 
until principles are settled.

Jeff Allen


More information about the Python-Dev mailing list