Skip to content

Instantly share code, notes, and snippets.

@dergachev
Created October 28, 2013 19:32
Show Gist options
  • Save dergachev/7203095 to your computer and use it in GitHub Desktop.
Save dergachev/7203095 to your computer and use it in GitHub Desktop.
Signal.trap("INT") do
puts "Terminating..."
sleep 1
exit 3
end
(1..9).each do |i|
puts "Processing " + i.to_s
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment