Avoid crash by verifying the existence of SIGHUP before accessing it.

This commit is contained in:
Mark D. Blackwell
2012-07-08 16:21:27 -03:00
parent 9901b9f924
commit ae7aeabb63

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