def readpartial(size)
      readable, = select([@handle, @pipe.first])
      return nil if readable.include?(@pipe.first)
      @handle.readpartial(size)
    rescue Errno::EBADF
      # If the IO has already been closed, reading from it will cause
      # Errno::EBADF.
      nil
    end
def readpartial(size)
      readable, = select([@handle, @pipe.first])
      return nil if readable.include?(@pipe.first)
      @handle.readpartial(size)
    rescue Errno::EBADF
      # If the IO has already been closed, reading from it will cause
      # Errno::EBADF.
      nil
    end
Same as IO#readpartial, or as close as we need.