void (VmData vm) { if (myShuttingDown || vm.shuttingDown) return; MyProcessHandler handler = vm.handler; if (handler == null) { if (vm.startAttemptCount.incrementAndGet() > MAX_PROCESS_LAUNCH_ATTEMPT_COUNT) { notifyOnFailure(vm.name, IdeCoreBundle.message("watcher.bailed.out.10x"), null); return; } try { Path toolName = myExecutable.getFileName(), toolDir = myExecutable.getParent(); Process process = new ProcessBuilder("wsl", "-d", vm.name, "-e", "./" + toolName).directory(toolDir.toFile()).start(); vm.handler = handler = new MyProcessHandler(process, vm); handler.startNotify(); } catch (IOException e) { vm.logger.error(e); vm.startAttemptCount.set(MAX_PROCESS_LAUNCH_ATTEMPT_COUNT); notifyOnFailure(vm.name, IdeCoreBundle.message("watcher.failed.to.start"), null); return; } } mySettingRoots.incrementAndGet(); try { handler.writeLine(ROOTS_COMMAND); for (String path : vm.recursive) handler.writeLine(path); for (String path : vm.flat) handler.writeLine('|' + path); handler.writeLine("#"); } catch (IOException e) { vm.logger.error(e); } }