This commit is contained in:
David Dollar
2011-12-08 16:57:33 -08:00
parent c5548a345e
commit 6e95d1ce94
2 changed files with 3 additions and 4 deletions

View File

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

View File

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