lib/rbbt/util/cmd.rb in rbbt-util-5.26.77 vs lib/rbbt/util/cmd.rb in rbbt-util-5.26.78
- old
+ new
@@ -148,17 +148,21 @@
end
pids = [pid]
if pipe
+
+ ConcurrentStream.setup sout, :pids => pids, :autojoin => no_wait, :no_fail => no_fail
+
err_thread = Thread.new do
while line = serr.gets
+ sout.log = line
Log.log "STDERR [#{pid}]: " + line, stderr
end if Integer === stderr and log
serr.close
end
- ConcurrentStream.setup sout, :pids => pids, :threads => [in_thread, err_thread, wait_thr].compact, :autojoin => no_wait, :no_fail => no_fail
+ sout.threads = [in_thread, err_thread, wait_thr].compact
sout
else
err = ""
err_thread = Thread.new do