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. test/jdk/java/lang/ProcessBuilder/WindowsExitValue.java line 43: > 41: try { > 42: Process process = new ProcessBuilder("cmd", "/c", "exit /b > 259").start(); > 43: long exitValue = process.waitFor(); `Process.waitFor()` returnsĀ anĀ `int`: Suggestion: int exitValue = process.waitFor(); ------------- PR: https://git.openjdk.org/jdk/pull/10680