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
+1 -2
View File
@@ -65,9 +65,8 @@ private ######################################################################
end end
def kill_all(signal="SIGTERM") def kill_all(signal="SIGTERM")
p [:ff]
running_processes.each do |pid, process| running_processes.each do |pid, process|
p [:pid, pid] p [:killing, pid]
Process.kill(signal, pid) rescue Errno::ESRCH Process.kill(signal, pid) rescue Errno::ESRCH
end end
end end
+2 -2
View File
@@ -14,9 +14,9 @@ class Foreman::Process
def run(pipe, basedir, environment) def run(pipe, basedir, environment)
Dir.chdir(basedir) do Dir.chdir(basedir) do
with_environment(environment) 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 @pid = io.pid
output pipe, "started with pid %d" output pipe, "started with pid %d" % @pid
Thread.new do Thread.new do
until io.eof? until io.eof?
output pipe, io.gets output pipe, io.gets