Alexey Izbyshev <izbys...@ispras.ru> added the comment:

Regarding fixing (1), I'm worrying about backward compatibility a bit. Some 
people who discovered that behavior might rely on such "move" semantics and 
expect that the redirected descriptor is not leaked into the child. OTOH, since 
descriptors are non-inheritable by default since 3.4, it might be less of an 
issue now. What do you think?

Otherwise, yes, I'd like to fix this, but fixing is a bit trickier than it may 
seem because sometimes descriptors are duplicated in _posixsubprocess.c (in 
case of low fds), so we need to track the ownership properly. I've already 
performed some work and discovered another issue: in a corner case involving 
closed standard fds, pipes created by subprocess may leak into the child and/or 
an incorrect redirection may occur. Since I can't completely fix this issue 
without affecting a discovered one, I think I'll do the opposite: file a new 
issue, fix it, and then go back to this one.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32270>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to