Closed GoogleCodeExporter closed 9 years ago
RunTests.java line 126 and 131 are both examples of a spawned process that
doesn't get its I/O drained.
I developing a fix that creates threads from the parent process to drain the
buffers, and then outputs to the parent's STDOUT and STDERR either sequentially
or as discovered. I'll write it to output as discovered unless told to do
otherwise. This might interleave STDOUT and STDERR but will paint a better
picture of runtime output.
The next question is where to put the fix. My current inclination is to add a
method to the TestUtils class. The method would create the reader threads,
spawn the child, attach the threads to the child, and wait for completion.
I'll attach a clean version of the fix for consideration sometime in the coming
week.
Original comment by ThomasCR...@gmail.com
on 22 Nov 2010 at 9:13
[deleted comment]
I've attached a new version of TestUtils.java. I'm going to think about this
change for a while before I commit.
Example:
spawnChildProcess(IndexWriter.class, System.out, System.err);
// runs "java <all arguments passed to this jre> IndexWriter" and outputs to
STDOUT and STDERR.
Original comment by ThomasCR...@gmail.com
on 24 Nov 2010 at 11:04
Attachments:
r401 has the fix for the child deadlock problem.
Original comment by ThomasCR...@gmail.com
on 29 Nov 2010 at 5:20
Original issue reported on code.google.com by
ThomasCR...@gmail.com
on 22 Nov 2010 at 9:01