On Mon, 10 Jun 2024 16:28:39 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:
>> `GetExitCodeProcess` method is not reliable for checking if a process exited >> already; it returns 259 (STILL_ACTIVE) if the process hasn't exited yet, but >> the same value is returned when the process exited with code 259. In order >> to check if the process exited, we need to check if its handle is in a >> signaled state using one of the wait methods. >> >> This PR fixes the onExit, exitValue, isAlive, and waitFor(timeout) methods >> to correctly handle the problematic exit code. >> >> I haven't fixed the ProcessImpl.toString method. I'm not sure the problem is >> important enough to justify an extra JNI call in the (probably typical) >> still-alive case. >> >> Tier1-3 testing clean. I modified the existing OnExitTest to cover this case. > > Daniel Jeliński has updated the pull request incrementally with one > additional commit since the last revision: > > waitForProcessExit0 should ignore interrupts LGTM ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19586#pullrequestreview-2108626204