New submission from Steven K. Wong :
The example code at
http://www.python.org/doc/2.6.2/library/subprocess.html#replacing-shell-pipeline
should be updated to add the close() call noted below:
output=`dmesg | grep hda`
==>
p1 = Popen(["dmesg"], stdout=PIPE)
p2 = Popen(["gr
Steven K. Wong added the comment:
Looks like a duplicate of http://bugs.python.org/issue7213 .
--
nosy: +steven.k.wong
___
Python tracker
<http://bugs.python.org/issue7
Steven K. Wong added the comment:
See this related issue: http://bugs.python.org/issue7213
--
___
Python tracker
<http://bugs.python.org/issue5898>
___
___
Pytho
Steven K. Wong added the comment:
See this related issue: http://bugs.python.org/issue7448
--
___
Python tracker
<http://bugs.python.org/issue5898>
___
___
Pytho
Steven K. Wong added the comment:
I think the hang is not a bug. Take a look at the Popen documentation on
close_fds. If you specify close_fds=True when creating proc2, the hang will not
happen when you remove the "proc2.stdin.close()" line.
--
nosy: +ste