classification
Title: subprocess + stdout redirection + wait + svn= hang
Type: Stage:
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: gregory.p.smith, tebeka
Priority: normal Keywords:

Created on 2008-08-18 21:30 by tebeka, last changed 2008-09-22 00:48 by gregory.p.smith. This issue is now closed.

Files
File name Uploaded Description Edit
svnout.py tebeka, 2008-08-18 21:30
Messages (2)
msg71385 - (view) Author: Miki Tebeka (tebeka) * Date: 2008-08-18 21:30
The attached script hangs on Ubuntu + Python 2.5.2.
When make the limit smaller (like 10) or not redirecting stdout, it works.

Running the svn command from shell took about 4sec, I gave up on the
script after a minute.

I tried it both with svn 1.4.6 and 1.5.1 - no change.
msg73547 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-09-22 00:48
This is not a subprocess bug.  the os's pipe buffer filled up so the
process never terminated to be noticed by wait.  see:

http://docs.python.org/dev/library/subprocess.html#subprocess.Popen.wait

use communicate() instead of wait().
History
Date User Action Args
2008-09-22 00:48:40gregory.p.smithsetstatus: open -> closed
resolution: not a bug
messages: + msg73547
nosy: + gregory.p.smith
2008-08-18 21:30:27tebekacreate