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