[Python-Dev] PEP 446: Open issues/questions (original) (raw)

Victor Stinner victor.stinner at gmail.com
Tue Jul 30 00:34:01 CEST 2013


2013/7/28 Antoine Pitrou <solipsis at pitrou.net>:

(B) Should subprocess make the file descriptors of passfds inheritable? If yes, should it be done before or after the fork? If it is done after the fork and before exec, it only affects the child process, at least on Linux (the file descriptor is still non-inheritable in the parent process). If it is done, it should definitely be done after the fork, IMO. subprocess shouldn't have any long-lasting effects on the process.

I modified the subprocess module to make fds of pass_fds inheritable. http://hg.python.org/features/pep-446/rev/75e5d34898aa

If we don't do that, it will probably break all applications using pass_fds (and so the backward compatibility).

Victor



More information about the Python-Dev mailing list