I think this bug should be closed as invalid. There is a subtle point
involving the FD_CLOEXEC flag, which newer versions of Python seem to
be setting on all file descriptors. This appears to defeat the
“close_fds” and “pass_fds” arguments to subprocess.Popen, leading to the
apparent bug: the file descriptors are being passed intact to the
child process, but are then immediately closed when another program is
exec’d. But of course it is possible to manually clear FD_CLOEXEC
yourself, e.g.

fcntl.fcntl(child1.stdin.fileno(), fcntl.F_SETFD, 
fcntl.fcntl(child1.stdin.fileno(), fcntl.F_GETFD) & ~fcntl.FD_CLOEXEC)

and when you do this, the “bug” no longer appears.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to