capture PTY::ChildExited

This commit is contained in:
David Dollar committed 2010-06-22 17:19:47 -04:00
1 parent 75f0ce4b9c
commit c2000484bb
1 file changed
+4
+4
View File
@@ -77,11 +77,15 @@ private ######################################################################
FileUtils.mkdir_p "log" FileUtils.mkdir_p "log"
command = process.command command = process.command
begin
PTY.spawn("#{process.command} 2>&1") do |stdin, stdout, pid| PTY.spawn("#{process.command} 2>&1") do |stdin, stdout, pid|
until stdin.eof? until stdin.eof?
info stdin.gets, process info stdin.gets, process
end end
end end
rescue PTY::ChildExited
# exited
end
end end
end end