Merge pull request #219 from MarkDBlackwell/patch-1

Avoid crash by verifying the existence of SIGHUP before accessing it.
This commit is contained in:
David Dollar
2012-07-09 06:30:14 -07:00

View File

@@ -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