BUGFIX: not terminating self correctly on hangups from parent

This commit is contained in:
Sam 2014-06-13 11:15:40 +10:00
parent 86b7429619
commit 58f3fcbc1a
1 changed files with 3 additions and 1 deletions

View File

@ -121,7 +121,9 @@ class Demon::Base
Thread.new do Thread.new do
while true while true
unless alive?(@parent_pid) unless alive?(@parent_pid)
Process.kill "QUIT", Process.pid Process.kill "TERM", Process.pid
sleep 10
Process.kill "KILL", Process.pid
end end
sleep 1 sleep 1
end end