Wait for descendant processes to exit.

This commit is contained in:
Keith Rarick
2010-09-17 21:28:01 +08:00
committed by David Dollar
parent e9b5ed81b8
commit 99204d7c1d
+2
View File
@@ -97,6 +97,7 @@ private ######################################################################
rescue PTY::ChildExited, Interrupt rescue PTY::ChildExited, Interrupt
info "process exiting", process info "process exiting", process
end end
Process.waitall
end end
end end
@@ -106,6 +107,7 @@ private ######################################################################
info "killing #{process.name} in pid #{pid}" info "killing #{process.name} in pid #{pid}"
Process.kill(signal, pid) Process.kill(signal, pid)
end end
Process.waitall
exit 0 exit 0
end end