Skip to content

Instantly share code, notes, and snippets.

@samg
Created February 1, 2012 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samg/1718733 to your computer and use it in GitHub Desktop.
Save samg/1718733 to your computer and use it in GitHub Desktop.
Doing it wrong
puts "Try ^C, or any kill signal, but I'll survive."
puts "You're going to have to kill -9 me. (Unlike other signals the kernal handles kill -9)"
loop do
begin
sleep 1e6
rescue Exception => e
puts "Caught #{[e.class.name, e].join}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment