From 58f3fcbc1a40edb48278d4df0bbd1ab55ce6c549 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 13 Jun 2014 11:15:40 +1000 Subject: [PATCH] BUGFIX: not terminating self correctly on hangups from parent --- lib/demon/base.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/demon/base.rb b/lib/demon/base.rb index c8cb0b0116e..254a17baaf8 100644 --- a/lib/demon/base.rb +++ b/lib/demon/base.rb @@ -121,7 +121,9 @@ class Demon::Base Thread.new do while true unless alive?(@parent_pid) - Process.kill "QUIT", Process.pid + Process.kill "TERM", Process.pid + sleep 10 + Process.kill "KILL", Process.pid end sleep 1 end