1 2 3 4 5 6 7 8 9 10 11 12
use std::process::ExitStatus; #[cfg(unix)] pub fn get(status: ExitStatus) -> i32 { use std::os::unix::process::ExitStatusExt; status.signal().unwrap_or(0) } #[cfg(not(unix))] pub fn get(child: ExitStatus) -> i32 { 0 }