This tiny program hangs:
=============== =============== =============== =============== ============
#!/usr/bin/env python
import subprocess
a = subprocess.Pope n('cat',shell = True,stdin = subprocess.PIPE ,
stdout = subprocess.PIPE )
b = subprocess.Pope n('cat >/dev/null',shell = True,stdin = a.stdout)
a.stdin.close()
b.wait() # hangs
a.wait() # never reached
=============== =============== =============== =============== ============
It shouldn't, should it?
Environment:
=============== =============== =============== =============== ============
Python 2.5.1 (r251:54863, Jun 20 2007, 12:14:09)
[GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2
=============== =============== =============== =============== ============
Marko
--
Marko Rauhamaa mailto:ma***@pa cujo.net
http://pacujo.net/marko/