lib/rbbt/util/cmd.rb in rbbt-util-4.2.0 vs lib/rbbt/util/cmd.rb in rbbt-util-4.3.0

- old
+ new

@@ -52,16 +52,20 @@ end def force_close if @pid Log.debug "Forcing close by killing '#{@pid}'" if log - Process.kill("KILL", @pid) - Process.waitpid(@pid) + begin + Process.kill("KILL", @pid) + Process.waitpid(@pid) + rescue + Log.low "Exception in forcing close of command [#{ @pid }, #{cmd}]: #{$!.message}" + end end @post.call if @post - original_close + original_close unless self.closed? end def read(*args) data = original_read(*args)