Martin Buchholz wrote:
This is a bug report with fix.

My code in UNIXProcess.java.linux introduced a hang if the subprocess terminates, but it has remaining descendants that keep the pipe file descriptors open.

Here's a fix:

http://cr.openjdk.java.net/~martin/webrevs/openjdk7/ProcessHang/ <http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk7/ProcessHang/>

Please review.

Alan, there are remaining (pre-existing) thorny issues with proper handling of process streams and asynchronous close, that we might want to discuss someday.



Martin
I checked 6944584 [1], and as you said, this is just reverting to how it used to work. The change looks fine to me. I've created a bug to track this and included a thread dump obtained from running the updated test without the fix.

6981138: (process) Process.waitFor() may hang if subprocess has live descendants (lnx)

On the test, it might be best to leave out wakeupJeff for now. Even if we come up with a solution for the asynchronous close issues then I assume this test will need to change anyway because it runs commands that are highly platform dependent.

-Alan.

[1] http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/422531c98ba5

Reply via email to