void (@NotNull ProcessHandler processHandler, long millisTimeout, @Nullable String commandLine) { if (processHandler.isProcessTerminated()) { if (commandLine == null && processHandler instanceof BaseProcessHandler) { commandLine = ((BaseProcessHandler<?>)processHandler).getCommandLine(); } LOG.warn("Process '" + commandLine + "' is already terminated!"); return; } processHandler.destroyProcess(); if (processHandler instanceof KillableProcess killableProcess) { if (killableProcess.canKillProcess()) { if (!processHandler.waitFor(millisTimeout)) { // doing 'force quite' killableProcess.killProcess(); } } } }