class ProcessExecuter::MonitoredPipe

def monitor_pipe

Other tags:
    Api: - private

Returns:
  • (void) -
def monitor_pipe
  new_data = pipe_reader.read_nonblock(chunk_size)
  # SimpleCov under JRuby reports the begin statement as not covered, but it is
  # :nocov:
  begin
    # :nocov:
    writers.each { |w| w.write(new_data) }
  rescue StandardError => e
    @exception = e
    @state = :closing
  end
rescue IO::WaitReadable
  pipe_reader.wait_readable(0.01)
end