[issue12786] subprocess wait() hangs when stdin is closed

2011-08-25 Thread Charles-François Natali
Charles-François Natali added the comment: Patch committed. Idan, thanks for the report. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 498b03a55297 by Charles-François Natali in branch '2.7': Issue #12786: Set communication pipes used by subprocess.Popen CLOEXEC to avoid http://hg.python.org/cpython/rev/498b03a55297 -- nosy: +python-dev ___

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-25 Thread Ross Lagerwall
Ross Lagerwall added the comment: Patch looks good after Victor's comment. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread STINNER Victor
STINNER Victor added the comment: subprocess_cloexec-1.diff: I'm too tired too review the test. The subprocess.py part looks correct, except the pipe2 name. Python 3 uses "_create_pipe = _posixsubprocess.cloexec_pipe". Pick one of those. -- ___ Pyt

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread Charles-François Natali
Charles-François Natali added the comment: With comment. I'll add a similar comment to default. -- Added file: http://bugs.python.org/file23032/subprocess_cloexec-1.diff ___ Python tracker

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: You might want to add a comment in the patch that the cloexec flag is removed from the child's pipes by calling dup2() before exec() :) I was a bit baffled at first when reading the patch. -- ___ Python tracker

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-24 Thread Charles-François Natali
Changes by Charles-François Natali : -- nosy: +pitrou, rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-20 Thread Idan Kamara
Idan Kamara added the comment: Thanks for getting on top of this so quickly Charles. Setting close_fds=True worked like a charm. -- ___ Python tracker ___ _

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch + test for 2.7. > Really? This is on gentoo, not debian, admittedly: That's because the change of close_fds to True by default and the CLOEXEC flag were added in 3.2. Since 3.1 is in security-fix mode only, this patch is only relevant

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Mads Kiilerich
Changes by Mads Kiilerich : -- nosy: +kiilerix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Charles-François Natali
Charles-François Natali added the comment: Hello Idan, > The following program hangs on Debian Debian is a good choice :-) Concerning your example, it hangs is because the file descriptor used to communicate with proc1 is inherited when proc2 is created (FDs are inherited upon fork by default

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Ben Wolfson
Ben Wolfson added the comment: "The guys at #python-dev confirmed the same happens on 2.7 but not on 3.x." Really? This is on gentoo, not debian, admittedly: coelacanth ~ 11:12:36 $ python3 Python 3.1.3 (r313:86834, May 1 2011, 09:41:48) [GCC 4.4.4] on linux2 Type "help", "copyright", "credi

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix type: resource usage -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12786] subprocess wait() hangs when stdin is closed

2011-08-19 Thread Idan Kamara
New submission from Idan Kamara : The following program hangs on Debian, Python 2.6.6: import subprocess proc1 = subprocess.Popen(['cat'], stdin=subprocess.PIPE) proc2 = subprocess.Popen(['cat'], stdin=subprocess.PIPE) proc1.stdin.close() proc1.wait() Changing the last two lines to: proc2.st