Skip to main content

exit_status_byte

Function exit_status_byte 

Source
pub fn exit_status_byte(status: &ExitStatus) -> u8
Expand description

Map a child’s std::process::ExitStatus to a process exit byte. A normal exit propagates the code. Signal death is not uniformly a clean stop: a shared Ctrl-C (SIGINT) is — the terminal delivered it to us too — but a SIGSEGV or the OOM killer’s SIGKILL is a real failure, and mapping it to success made a crashed `bynkc test` read as passing in CI. Non-SIGINT signals exit `128 + signal`, the shell convention.