29 Jul
2013
29 Jul
'13
5:34 p.m.
2013/7/28 Antoine Pitrou
(B) Should subprocess make the file descriptors of pass_fds 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