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

Martin Buchholz martinrb at google.com
Mon Aug 30 18:38:56 UTC 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/core-libs-dev/attachments/20100830/a957ca3b/attachment.html>


More information about the core-libs-dev mailing list