[issue26769] Python 2.7: make private file descriptors non inheritable

2016-12-05 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I loose interest on this backport. The patch is large, the risk of regression is high, the goal is non-obvious. I'm not sure that such bugfix is still useful since Python 2.7 is old and developers know how to workaround Python 2.7 limitations. The

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-19 Thread Martin Panter
Martin Panter added the comment: The patch looks reasonable as far as I understand it. I don’t know what the consequences of adding new PyAPI_FUNC() symbols to 2.7 is, or changing the Windows build files, so can’t really comment on those aspects though. I left some questions about porting

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-19 Thread STINNER Victor
STINNER Victor added the comment: > It looks like some of these do make the file descriptor accessible to the > Python user. (...) Oh right, I reverted changes on these modules. What do you think of the patch version 2? Changes since patch version 1: * Revert changes in linuxaudio, oss,

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-15 Thread Martin Panter
Martin Panter added the comment: It looks like some of these do make the file descriptor accessible to the Python user. The following are from the RST documentation: oss_audio_device.fileno() oss_mixer_device.fileno() epoll.fileno() kqueue.fileno() audio device.fileno() I did not find any

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-15 Thread Ned Deily
Changes by Ned Deily : -- nosy: +gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list

[issue26769] Python 2.7: make private file descriptors non inheritable

2016-04-15 Thread STINNER Victor
New submission from STINNER Victor: By default, subprocess.Popen doesn't close file descriptors (close_fds=False by default) and so a child process inherit all file descriptors open by the parent process. See the PEP 446 for the long rationale. I propose to partially backport the PEP 446: