lib/rbbt/util/cmd.rb in rbbt-util-5.34.15 vs lib/rbbt/util/cmd.rb in rbbt-util-5.34.16

- old
+ new

@@ -161,10 +161,11 @@ Log.debug{"CMD: [#{pid}] #{cmd}" if log} if in_content.respond_to?(:read) in_thread = Thread.new(Thread.current) do |parent| + Thread.current.report_on_exception = false if no_fail begin begin while c = in_content.readpartial(Misc::BLOCK_SIZE) sin << c end @@ -175,10 +176,10 @@ unless dont_close_in in_content.close unless in_content.closed? in_content.join if in_content.respond_to? :join end rescue - Log.error "Error in CMD [#{pid}] #{cmd}: #{$!.message}" + Log.error "Error in CMD [#{pid}] #{cmd}: #{$!.message}" unless no_fail raise $! end end else in_thread = nil