Terminate gracefully upon SIGHUP

Tmux sends SIGHUP when a session is killed which can result in orphaned processes. Adding a SIGHUP handler terminates the processes as expected.
This commit is contained in:
Stefan Schüßler
2012-05-14 13:04:46 +03:00
parent 003b466a17
commit 6274f99225

View File

@@ -36,6 +36,7 @@ class Foreman::Engine
trap("TERM") { puts "SIGTERM received"; terminate_gracefully }
trap("INT") { puts "SIGINT received"; terminate_gracefully }
trap("HUP") { puts "SIGHUP received"; terminate_gracefully }
assign_colors
spawn_processes