Created
March 21, 2014 23:31
-
-
Save anonymous/9698691 to your computer and use it in GitHub Desktop.
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
#!/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