On Wed, 12 Oct 2022 16:30:07 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Process.waitFor() throws IllegalThreadStateException when a process returns 
> an exit code of 259.
> As described in the bug report, `waitFor()` should not be sensitive to the 
> exit value.
> Previously, it erroneously threw IllegalStateException.
> Added a test to verify.

Though `waitForInterruptibly(handle)` doesn't check the handle, the code in the 
caller `ProcessImpl.waitFor()` calls `Thread.interrupted()` and throws the 
`InterruptedException` if needed. 
So the exit code is returned only if the process had exited.

-------------

PR: https://git.openjdk.org/jdk/pull/10680

Reply via email to