Last active
February 1, 2022 05:04
-
-
Save ihcsim/cec9eac1e1a585d19e3172e4a458971f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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