Message3493

Author pekka.klarck
Recipients pekka.klarck
Date 2008-09-08.22:30:59
SpamBayes Score 2.1806245e-07
Marked as misclassified No
Message-id <1220913060.4.0.294486445031.issue1124@psf.upfronthosting.co.za>
In-reply-to
Content
Jython hangs when os.popen, or some other os.popen variants, is used to
execute external commands that produce a lot of text to the standard
error stream.

An example script demonstrating this problem is attached. It takes the
number of characters to write into stdout and stderr as argument, and 
when I run it on my system (OS X 10.5.4 Core 2 Duo w/ Jython 2.2 on Java
1.5.0_13) it executes successfully with argument 16383 but hangs with
16384. 

If '2>&1' is added after the executed command, or the script is changed
to write only to the stdout, execution passes without problems. Even
though the script uses only os.popen, I was able to reproduce the same
issue with os.popen3, and based on a brief look at the code also other
os.popen variants are affected.

I've tested this only with 2.2, but I can test also against 2.5a2 if
there's a need.
History
Date User Action Args
2008-09-08 22:31:00pekka.klarcksetrecipients: + pekka.klarck
2008-09-08 22:31:00pekka.klarcksetmessageid: <1220913060.4.0.294486445031.issue1124@psf.upfronthosting.co.za>
2008-09-08 22:31:00pekka.klarcklinkissue1124 messages
2008-09-08 22:30:59pekka.klarckcreate