public static void close(@NotNull Process process) {
    try {
      if (process.waitFor(ourSynchronousWaitTimeout, TimeUnit.MILLISECONDS)) {
        closeStreams(process);
        return;
      }
    }
    catch (InterruptedException e) {
      closeStreams(process);
      throw new RuntimeException(e);
    }

    process.destroy();

    AppExecutorUtil.getAppScheduledExecutorService().schedule(() -> {
      try {
        if (process.isAlive()) {
          process.destroyForcibly();
        }
      }
      finally {
        closeStreams(process);
      }
    }, ourAsynchronousWaitTimeout, TimeUnit.MILLISECONDS);
  }
public static void close(@NotNull Process process)