From 6e95d1ce9486eef6a5de6a02eb3f6cc8747a3d81 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Thu, 8 Dec 2011 16:57:33 -0800 Subject: [PATCH] wip --- lib/foreman/engine.rb | 3 +-- lib/foreman/process.rb | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index 991e2cc..5d0d75e 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -65,9 +65,8 @@ private ###################################################################### end def kill_all(signal="SIGTERM") - p [:ff] running_processes.each do |pid, process| - p [:pid, pid] + p [:killing, pid] Process.kill(signal, pid) rescue Errno::ESRCH end end diff --git a/lib/foreman/process.rb b/lib/foreman/process.rb index 8a3f6ab..fc75f32 100644 --- a/lib/foreman/process.rb +++ b/lib/foreman/process.rb @@ -14,9 +14,9 @@ class Foreman::Process def run(pipe, basedir, environment) Dir.chdir(basedir) do with_environment(environment) do - io = IO.popen("#{entry.command} 2>&1", "w+") + io = IO.popen("#{entry.command} $FOO 2>&1", "w+") @pid = io.pid - output pipe, "started with pid %d" + output pipe, "started with pid %d" % @pid Thread.new do until io.eof? output pipe, io.gets