don't fork on 'run'
This removes the fork when doing `foreman run`. The fork results in an unnecessary process laying around. The parent process doesn't do anything other than fork and wait for the child to exit.
This commit is contained in:
@@ -83,7 +83,6 @@ class Foreman::CLI < Thor
|
||||
engine.load_procfile(procfile)
|
||||
end
|
||||
|
||||
pid = fork do
|
||||
begin
|
||||
engine.env.each { |k,v| ENV[k] = v }
|
||||
if args.size == 1 && process = engine.process(args.first)
|
||||
@@ -97,9 +96,6 @@ class Foreman::CLI < Thor
|
||||
error "command not found: #{args.first}"
|
||||
end
|
||||
end
|
||||
Process.wait(pid)
|
||||
exit $?.exitstatus
|
||||
end
|
||||
|
||||
desc "version", "Display Foreman gem version"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user