exitCodeOrNull
Reports the exit status of a process that has already terminated, or null if it is still running (or the platform cannot tell).
Paired with Process.isAlive: isAlive() == false says the browser is gone, this says how it went. The distinction is the whole point — on Windows a Chrome that finds a live instance on the same --user-data-dir hands its command line over and exits 0, silently, without ever opening a debug port; a Chrome that crashed exits non-zero. Both look identical without this.
Reads the exit status, or null while the process is still running.
exitValue() throws IllegalThreadStateException rather than returning a sentinel when the process is alive, which is exactly the "still running" case we report as null.
Reads the exit status via GetExitCodeProcess, the same call Process.isAlive uses — null while it still reports STILL_ACTIVE.
Not available on this target: liveness here is kill(pid, 0), which says whether the process exists but never carries its exit status, and nothing reaps the child to collect one.