2 // On Windows the GetExitCodeProcess API is used to get the exit code of a
3 // process, but it's easy to mistake a process exiting with the code 259 as
4 // "still running" because this is the value of the STILL_ACTIVE constant. Make
5 // sure we handle this case in the standard library and correctly report the
8 // Note that this is disabled on unix as processes exiting with 259 will have
9 // their exit status truncated to 3 (only the lower 8 bits are used).
13 use std::process::{self, Command};
16 if env::args().len() == 1 {
17 let status = Command::new(env::current_exe().unwrap())
21 assert_eq!(status.code(), Some(259));