This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author izbyshev
Recipients gregory.p.smith, izbyshev, nitishch, pitrou, vstinner
Date 2017-12-10.22:03:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512943416.02.0.213398074469.issue32270@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-12-10 22:03:36izbyshevsetrecipients: + izbyshev, gregory.p.smith, pitrou, vstinner, nitishch
2017-12-10 22:03:36izbyshevsetmessageid: <1512943416.02.0.213398074469.issue32270@psf.upfronthosting.co.za>
2017-12-10 22:03:36izbyshevlinkissue32270 messages
2017-12-10 22:03:35izbyshevcreate