private void startupProcess(boolean restart) throws IOException {
    if (myIsShuttingDown) {
      return;
    }
    if (ShutDownTracker.isShutdownHookRunning()) {
      myIsShuttingDown = true;
      return;
    }

    if (myStartAttemptCount.incrementAndGet() > MAX_PROCESS_LAUNCH_ATTEMPT_COUNT) {
      notifyOnFailure(IdeCoreBundle.message("watcher.bailed.out.10x"), null);
      return;
    }

    if (restart) {
      shutdownProcess(true);
    }

    LOG.info("Starting file watcher: " + myExecutable);
    Process process = new ProcessBuilder(myExecutable.toAbsolutePath().toString()).start();
    myProcessHandler = new MyProcessHandler(process, myExecutable.getFileName().toString());
    myProcessHandler.startNotify();

    if (restart) {
      List<String> recursive = myRecursiveWatchRoots;
      List<String> flat = myFlatWatchRoots;
      if (recursive.size() + flat.size() > 0) {
        doSetWatchRoots(recursive, flat, true);
      }
    }
  }
private void startupProcess(boolean restart)