[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-14 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I updated the documentation and changed the close_fds default on Windows to be True when possible per Giovanni's suggestion in r87229. That keeps the API and defaults as consistent as possible across all platforms. -- resolution: -

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-14 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: P.S. Yes I will be backporting all of this to subprocess32. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-13 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Milko's subprocess-00/01/02 patch set have been committed with minor modifications in r87207 r87208. Thanks, especially for the test cases! Is there anything else left that we know about for this bug? --

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-13 Thread Giovanni Bajo
Giovanni Bajo giovannib...@gmail.com added the comment: Hi Gregory, will you backport Mirko's patches to subprocess32? The last thing left in this bug is my proposal to change the default of close_fds to True to Windows too, but at the same time detect whether this is possible or not

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-12 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: fd_status.py: +try: +_MAXFD = os.sysconf(SC_OPEN_MAX) +except: +_MAXFD = 256 It looks like this code (256 constant) comes from subprocess.py. Is that a good value? On Linux, SC_OPEN_MAX is usually 1024, and it can be 4096.

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-12 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: For the Python implementation, the GIL is not enough to ensure the atomicity of a process creation. That's why _posixsubprocess was created. I suppose that other parts of subprocess are not atomic and a lock is required to ensure

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-12 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: The close_fds default has been fixed in r87206 to remove the DeprecationWarning and remain False on Windows. It changes to True on POSIX. -- ___ Python tracker rep...@bugs.python.org

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Milko Krachounov pyt...@milko.3mhz.net added the comment: OK, I have created new updated patches. I haven't combined them in one patch because some of the changes can be applied independently, the three patches can be cat'ed together if anyone sees separate patches a problem. ;) I. Changes: *

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Added file: http://bugs.python.org/file20018/subprocess-01-atomic_cloexec_pipe2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Added file: http://bugs.python.org/file20019/subprocess-02-cloexec_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Removed file: http://bugs.python.org/file20019/subprocess-02-cloexec_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Added file: http://bugs.python.org/file20020/subprocess-02-cloexec_tests.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Removed file: http://bugs.python.org/file20005/subprocess-cloexec-atomic-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Removed file: http://bugs.python.org/file20009/subprocess-cloexec-atomic-py3k-tests1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213 ___

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Milko Krachounov
Changes by Milko Krachounov pyt...@milko.3mhz.net: Removed file: http://bugs.python.org/file20013/subprocess-cloexec-atomic-py3k-tests2-close_fds.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7213

[issue7213] subprocess leaks open file descriptors between Popen instances causing hangs

2010-12-11 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Paul Giovanni: yes I hadn't given the windows side of things any thought when I made the change for beta1. Milko: The DISREGARD_FDS approach is basically what I was intending to do. Also, there really wasn't any objection to going ahead and