I wonder if the p.waitFor() is needed? What if the process launching expired with a timeout and now we are still waiting for the process to end - wouldn’t that kind of defeat the timeout? In any case, the destroyForcibly() should end the process whether we wait for it or not.
/Staffan On 25 sep 2014, at 11:54, Jaroslav Bachorik <jaroslav.bacho...@oracle.com> wrote: > Please, review the following change to the JDK test library class > > Issue : https://bugs.openjdk.java.net/browse/JDK-8059034 > Webrev: http://cr.openjdk.java.net/~jbachorik/8059034/webrev.00 > > Currently, the ProcessTools.startProcess() might leave a dangling process > behind when a timeout or interrupt happens. The solution is to try and > forcibly terminate the forked process when this happens. > > Thanks, > > -JB-