public void handleProcess()

in appengine-plugins-core/src/main/java/com/google/cloud/tools/appengine/operations/cloudsdk/process/LegacyProcessHandler.java [62:89]


  public void handleProcess(Process process) throws ProcessHandlerException {
    Thread stdOutHandler = null;
    Thread stdErrHandler = null;
    try {

      // Only handle stdout or stderr if there are listeners.
      if (!stdOutLineListeners.isEmpty()) {
        stdOutHandler = handleStdOut(process);
      }
      if (!stdErrLineListeners.isEmpty()) {
        stdErrHandler = handleErrOut(process);
      }

      for (ProcessStartListener startListener : startListeners) {
        startListener.onStart(process);
      }

      if (async) {
        asyncRun(process, stdOutHandler, stdErrHandler);
      } else {
        shutdownProcessHook(process);
        syncRun(process, stdOutHandler, stdErrHandler);
      }

    } catch (InterruptedException | AppEngineException ex) {
      throw new ProcessHandlerException(ex);
    }
  }