lib/rbbt/util/cmd.rb in rbbt-util-5.14.28 vs lib/rbbt/util/cmd.rb in rbbt-util-5.14.29
- old
+ new
@@ -102,11 +102,12 @@
in_content = options.delete(:in)
stderr = options.delete(:stderr)
pipe = options.delete(:pipe)
post = options.delete(:post)
log = options.delete(:log)
- dont_close_in = options.delete(:dont_close_in)
+ no_fail = options.delete(:no_fail)
+ dont_close_in = options.delete(:dont_close_in)
log = true if log.nil?
if stderr == true
stderr = Log::HIGH
@@ -203,11 +204,11 @@
end
serr.close
end
#SmartIO.tie sout, pid, cmd, post, in_content, sin, serr
- ConcurrentStream.setup sout, :pids => [pid], :autojoin => true
+ ConcurrentStream.setup sout, :pids => [pid], :autojoin => true, :no_fail => no_fail
sout
else
err = ""
Thread.new do
@@ -215,10 +216,10 @@
err << serr.gets if Integer === stderr
end
serr.close
end
- ConcurrentStream.setup sout, :pids => [pid], :autojoin => true
+ ConcurrentStream.setup sout, :pids => [pid], :autojoin => true, :no_fail => no_fail
out = StringIO.new sout.read
sout.close unless sout.closed?
Process.waitpid pid