diff --git a/lib/foreman/engine.rb b/lib/foreman/engine.rb index 42cca0f..f15d507 100644 --- a/lib/foreman/engine.rb +++ b/lib/foreman/engine.rb @@ -77,10 +77,14 @@ private ###################################################################### FileUtils.mkdir_p "log" command = process.command - PTY.spawn("#{process.command} 2>&1") do |stdin, stdout, pid| - until stdin.eof? - info stdin.gets, process + begin + PTY.spawn("#{process.command} 2>&1") do |stdin, stdout, pid| + until stdin.eof? + info stdin.gets, process + end end + rescue PTY::ChildExited + # exited end end end