Ross Lagerwall rosslagerw...@gmail.com added the comment:
Patch looks good after Victor's comment.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12786
___
Roundup Robot devn...@psf.upfronthosting.co.za 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
Charles-François Natali neolo...@free.fr added the comment:
Patch committed.
Idan, thanks for the report.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Changes by Charles-François Natali neolo...@free.fr:
--
nosy: +pitrou, rosslagerwall
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12786
___
___
Antoine Pitrou pit...@free.fr 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.
--
___
Charles-François Natali neolo...@free.fr 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 rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com 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.
--
Idan Kamara idank...@gmail.com added the comment:
Thanks for getting on top of this so quickly Charles. Setting close_fds=True
worked like a charm.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12786
New submission from Idan Kamara idank...@gmail.com:
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
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +neologix
type: resource usage - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12786
___
Ben Wolfson wolf...@gmail.com 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,
Charles-François Natali neolo...@free.fr 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
Changes by Mads Kiilerich m...@kiilerich.com:
--
nosy: +kiilerix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12786
___
___
Python-bugs-list
Charles-François Natali neolo...@free.fr 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
14 matches
Mail list logo