code: protected Runnable newProcessStreamReader(InputStream in) {
      return () -> {
        if (isRunning()) {
          BufferedReader reader = newReader(in);
  
          try {
            for (String input = reader.readLine(); input != null; input = reader.readLine()) {
              this.compositeProcessStreamListener.onInput(input);
            }
          }
          catch (IOException ignore) {
            // Ignore IO error and just stop reading from the process input stream
            // The IO error occurred most likely because the process was terminated
          }
          finally {
            close(reader);
          }
        }
      };
    }
docs: /* (non-Javadoc)