INNER CODE UNIT · Rust
shutdown_with_exitcode
rustic-rs/rustic · src/application.rs:128
fn shutdown_with_exitcode(&self, shutdown: Shutdown, exit_code: i32) -> ! {
let hooks = &RUSTIC_APP.config().global.hooks;
match shutdown {
Shutdown::Crash => _ = hooks.run_failed(),
_ => _ = hooks.run_after(),
};
_ = hooks.run_finally();
let result = self.state().components().shutdown(self, shutdown);
if let Err(e) = result {
fatal_error(self, &e)
}
process::exit(exit_code);
}
}