Message307995
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. |
|
Date |
User |
Action |
Args |
2017-12-10 22:03:36 | izbyshev | set | recipients:
+ izbyshev, gregory.p.smith, pitrou, vstinner, nitishch |
2017-12-10 22:03:36 | izbyshev | set | messageid: <1512943416.02.0.213398074469.issue32270@psf.upfronthosting.co.za> |
2017-12-10 22:03:36 | izbyshev | link | issue32270 messages |
2017-12-10 22:03:35 | izbyshev | create | |
|