Skip to content

Instantly share code, notes, and snippets.

@skarnecki
Created February 28, 2017 12:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skarnecki/1f0857c1da6d3105a52e301c6435f692 to your computer and use it in GitHub Desktop.
Save skarnecki/1f0857c1da6d3105a52e301c6435f692 to your computer and use it in GitHub Desktop.
Rust fork-bomb ~ defused
#[allow(unconditional_recursion)]
fn main(){
thread();
}
#[allow(unconditional_recursion)]
fn thread(){
loop {
std::thread::spawn(thread);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment