[Python-Dev] PEP 446: Open issues/questions

Victor Stinner victor.stinner at gmail.com
Fri Aug 2 02:36:40 CEST 2013

2013/7/30 Antoine Pitrou <solipsis at pitrou.net>:
> Le Tue, 30 Jul 2013 09:09:38 +0200,
> Charles-François Natali <cf.natali at gmail.com> a écrit :
>> This looks more and more like PEP 433 :-)
>> And honestly, when I think about it, I think that this whole mess is a
>> solution looking for a problem.
>> If we don't want to inherit file descriptors in child processes, the
>> answer is simple: the subprocess module (this fact is not even
>> mentioned in the PEP).
> This is a good point. Are there any reasons (other than fd inheritance)
> not to use subprocess? If there are, perhaps we should try to eliminate
> them by improving subprocess.

On Windows, inheritable handles (including open files) are still
inherited when a standard stream is overriden in the subprocess module
(default value of close_fds is set to False in this case). This issue
cannot be solved (at least, I don't see how): it is a limitation of
Windows. bInheritedHandles must be set to FALSE (inherit *all*
inheritable handles) when handles of standard streams are specified in
the startup information of CreateProcess().


More information about the Python-Dev mailing list