[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

Gregory P. Smith report at bugs.python.org
Mon Nov 25 09:29:14 CET 2013


Gregory P. Smith added the comment:

adding {0,1,2} to fds_to_keep (populated from pass_fds) is indeed an alternate approach.  A variant of an alternate patch doing that attached.

This actually simplifies code.  Is there anything this would hurt that i'm not seeing?

I suppose it adds minor overhead to the fork_exec() call by passing more in and lookups into the fds_to_keep list now that it will always contain at least 4 values instead of the previous 1.  I doubt that is matters (I haven't measured anything).

----------
Added file: http://bugs.python.org/file32830/issue15798_alternate-pass_fds-gps01.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15798>
_______________________________________


More information about the Python-bugs-list mailing list