lib/backticks/command.rb in backticks-1.0.4 vs lib/backticks/command.rb in backticks-1.0.5
- old
+ new
@@ -71,9 +71,14 @@
end
# Determine whether output has been exhausted.
def eof?
@stdout.eof? && @stderr.eof?
+ rescue Errno::EIO
+ # The result of read operation when pty slave is closed is platform
+ # dependent.
+ # @see https://stackoverflow.com/questions/10238298/ruby-on-linux-pty-goes-away-without-eof-raises-errnoeio
+ true
end
# Provide a callback to monitor input and output in real time. This method
# saves a reference to block for later use; whenever the command generates
# output or receives input, the block is called back with the name of the