boolean (@NotNull Content content, boolean modal) { if (myProcessHandler == null || myProcessHandler.isProcessTerminated() || myProcessHandler.isProcessTerminating()) { return true; } myProcessHandler.putUserData(RunContentManagerImpl.ALWAYS_USE_DEFAULT_STOPPING_BEHAVIOUR_KEY, Boolean.TRUE); final String sessionName = myProcessHandler.getExecutionName(); final WaitForProcessTask task = new WaitForProcessTask(myProcessHandler, sessionName, modal, myProject) { @Override public void onCancel() { // stop waiting for the process myProcessHandler.forceProcessDetach(); } }; return askUserAndWait(myProcessHandler, sessionName, task); }