Skip to content

Instantly share code, notes, and snippets.

@ihcsim
Last active February 1, 2022 05:04
Show Gist options
  • Save ihcsim/cec9eac1e1a585d19e3172e4a458971f to your computer and use it in GitHub Desktop.
Save ihcsim/cec9eac1e1a585d19e3172e4a458971f to your computer and use it in GitHub Desktop.
fn main() {
let signal = "kill".to_string();
loop {
exit(signal);
}
}
fn exit(s: String) {
if s == "kill" {
println!("exiting with signal {}", s);
std::process::exit(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment