Created
February 1, 2012 19:17
-
-
Save samg/1718733 to your computer and use it in GitHub Desktop.
Doing it wrong
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
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