Message4415

Author pjenvey
Recipients fwierzbicki, pekka.klarck, pjenvey, zyasoft
Date 2009-04-03.06:21:16
SpamBayes Score 4.6820048e-11
Marked as misclassified No
Message-id <1238739678.2.0.30979195346.issue1124@psf.upfronthosting.co.za>
In-reply-to
Content
indeed, subprocess didn't have this problem, so I've fixed this by 
rewriting popen2 to use it. r6154

I've bumped the size of one of the test_subprocess tests which should 
test this condition (I think)

The script won't deadlock now, but note that you may see the size of the 
final output being smaller than what CPython produces. This is because 
not all the stderr from the child process will always be printed (stdout 
is fine because you're explicitly reading it via PIPE).

In Jython the parent and child processes can't actually share file 
descriptors (Java doesn't allow it), so we're forced to keep the two in 
sync via a separate thread. This thread is a daemon thread (otherwise it 
could prevent Jython from exiting, IIRC) so Jython can exit before it 
captures all the child's stderr

However the output will be like CPython's if the program sleeps for a 
short time before exiting
History
Date User Action Args
2009-04-03 06:21:18pjenveysetmessageid: <1238739678.2.0.30979195346.issue1124@psf.upfronthosting.co.za>
2009-04-03 06:21:18pjenveysetrecipients: + pjenvey, fwierzbicki, pekka.klarck, zyasoft
2009-04-03 06:21:17pjenveylinkissue1124 messages
2009-04-03 06:21:17pjenveycreate