Skip to content

Instantly share code, notes, and snippets.

@holin
Created July 28, 2009 13:03
Show Gist options
  • Save holin/157253 to your computer and use it in GitHub Desktop.
Save holin/157253 to your computer and use it in GitHub Desktop.
list = {"HUP"=>1, "USR1"=>10, "USR2"=>12}
list.each do |k,v|
Signal.trap(k) do
puts k
end
end
while true
puts ". "
sleep 5
end
# kill -s HUP 24357
# kill -s USR1 24357
# kill -s USR2 24357
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment