Function std::env::set_exit_statusUnstable [-] [+] [src]

pub fn set_exit_status(code: i32)

Sets the process exit code

Sets the exit code returned by the process if all supervised tasks terminate successfully (without panicking). If the current root task panics and is supervised by the scheduler then any user-specified exit status is ignored and the process exits with the default panic status.

Note that this is not synchronized against modifications of other threads.