wip
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user