Skip to content

Instantly share code, notes, and snippets.

Created March 21, 2014 23:31
Show Gist options
  • Save anonymous/9698691 to your computer and use it in GitHub Desktop.
Save anonymous/9698691 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
Signal.trap("TERM") do
puts "received TERM"
pid = Process.pid
Process.kill("TERM", -pid)
exit 9
end
child = Process.fork do
Process::exec "sleep 10000"
end
puts "main pid: #{$$}"
puts "child pid: #{child}"
while true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment