Answers for "exit program rust"

0

exit program rust

// windows
std::process::exit(0) // 0 for pass exit, and any other value for failure

// linux
std::process::exit(0x0100); // 0x0100 is 0 on linux but 256 on windows
Posted by: Guest on March-18-2022

Browse Popular Code Answers by Language