Bugs item #1162428, was opened at 2005-03-13 14:35
Message generated for change (Comment added) made by astrand
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1162428&group_id=5470
Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: neuhauser (neuhauser)
>Assigned to: Peter �strand (astrand)
Summary: subprocess.Popen with copious output hangs
Initial Comment:
the following script works fine with modest amount of
output from the subprocess, but hangs with 23 kB of output:
import subprocess
c = subprocess.Popen (['svnlook', 'diff',
'/home/svn/repos', '-r', '57'],
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.STDOUT)
rc = c.wait ()
lines = [line.rstrip () for line in c.stdout.readlines ()]
if rc:
raise Exception (lines)
print lines
r57 in the above subversion repository produces a diff
of just under 23 kB, and the code hangs in:
^CTraceback (most recent call last):
File "/home/roman/tmp/scratch15", line 9, in ?
rc = c.wait ()
File "/usr/local/lib/python2.4/subprocess.py", line
1018, in wait
pid, sts = os.waitpid(self.pid, 0)
KeyboardInterrupt
this is with 2.4 built from the ports on
FreeBSD isis.sigpipe.cz 4.10-STABLE FreeBSD 4.10-STABLE
#3: Sat Aug 7 16:06:48 CEST 2004 i386
----------------------------------------------------------------------
>Comment By: Peter �strand (astrand)
Date: 2005-03-19 08:04
Message:
Logged In: YES
user_id=344921
This is not a subprocess bug. You must read away the data
before wait() on the process.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1162428&group_id=5470
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com