diff Doc/lib/libsubprocess.tex @ 34050:fd1be494c31b legacy-trunk

Corrected example for replacing shell pipeline. Fixes bug 1073790.
author Peter Astrand <astrand@lysator.liu.se>
date Tue, 30 Nov 2004 18:06:42 +0000
parents 0ae28c3a8d24
children 73b09c2b788b 60830ad6275e
line wrap: on
line diff
--- a/Doc/lib/libsubprocess.tex	Tue Nov 30 14:42:24 2004 +0000
+++ b/Doc/lib/libsubprocess.tex	Tue Nov 30 18:06:42 2004 +0000
@@ -239,7 +239,7 @@
 output=`dmesg | grep hda`
 ==>
 p1 = Popen(["dmesg"], stdout=PIPE)
-p2 = Popen(["grep", "hda"], stdin=p1.stdout)
+p2 = Popen(["grep", "hda"], stdin=p1.stdout, stdout=PIPE)
 output = p2.communicate()[0]
 \end{verbatim}