From ae7aeabb63303d27291a2828e80c259c8191d10c Mon Sep 17 00:00:00 2001 From: "Mark D. Blackwell" Date: Sun, 8 Jul 2012 16:21:27 -0300 Subject: [PATCH] Avoid crash by verifying the existence of SIGHUP before accessing it. --- lib/foreman/engine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index 9ab6069..f4c70f4 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -39,7 +39,7 @@ class Foreman::Engine def start trap("TERM") { puts "SIGTERM received"; terminate_gracefully } trap("INT") { puts "SIGINT received"; terminate_gracefully } - trap("HUP") { puts "SIGHUP received"; terminate_gracefully } + trap("HUP") { puts "SIGHUP received"; terminate_gracefully } if ::Signal.list.keys.include? 'HUP' startup spawn_processes