correct shutdown signals

processes are sent SIGTERM followed 3 seconds later by SIGKILL
This commit is contained in:
David Dollar
2011-06-03 01:31:51 -04:00
parent 6c465b4ef1
commit f2f09554c8
3 changed files with 33 additions and 12 deletions
+6
View File
@@ -1,5 +1,11 @@
#!/usr/bin/env ruby
%w( SIGINT SIGTERM SIGHUP ).each do |signal|
trap(signal) do
puts "received #{signal} but i'm ignoring it!"
end
end
while true
puts "tick: #{ARGV.inspect} -- FOO:#{ENV["FOO"]}"
sleep 1