From ed3e5a78d95f41a64f986a404b9e6f90892b0787 Mon Sep 17 00:00:00 2001 From: Brandon Robins Date: Fri, 10 Nov 2017 16:40:38 -0600 Subject: [PATCH] Prevents god from resurrecting a keepalive process that has been stopped --- lib/god/process.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/god/process.rb b/lib/god/process.rb index e65a6870..fbc8a69d 100644 --- a/lib/god/process.rb +++ b/lib/god/process.rb @@ -276,7 +276,10 @@ def call_action(action) applog(self, :warn, "#{self.name} #{action} command exited with non-zero code = #{exit_code}") end - ensure_stop if action == :stop + if action == :stop + ensure_stop + return + end end if @tracking_pid or (@pid_file.nil? and WRITES_PID.include?(action))