From 12720b4c12e35017a4993f37c23407b8d848667d Mon Sep 17 00:00:00 2001 From: David Dollar Date: Thu, 10 Nov 2011 15:02:09 -0500 Subject: [PATCH] fix colors during execution of single process --- lib/foreman/engine.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index bbdc360..c74c9cb 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -42,8 +42,9 @@ class Foreman::Engine end def execute(name) - error "no such process: #{name}" unless procfile[name] - fork procfile[name] + error "no such process: #{name}" unless process = procfile[name] + process.color = next_color + fork process trap("TERM") { puts "SIGTERM received"; terminate_gracefully } trap("INT") { puts "SIGINT received"; terminate_gracefully }