From 544eea25e133d69a62e2109528af0486e0d6e472 Mon Sep 17 00:00:00 2001 From: Sergey Simonchik Date: Thu, 24 Nov 2016 16:27:11 +0300 Subject: [PATCH] WEB-24359 2016.3 Run configuration stops by SIGKILL instead of SIGINT on Windows --- .../execution/process/KillableProcessHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/execution/process/KillableProcessHandler.java b/platform/platform-impl/src/com/intellij/execution/process/KillableProcessHandler.java index 7bafa9af0a2a..6df11cfe8e05 100644 --- a/platform/platform-impl/src/com/intellij/execution/process/KillableProcessHandler.java +++ b/platform/platform-impl/src/com/intellij/execution/process/KillableProcessHandler.java @@ -41,15 +41,15 @@ public class KillableProcessHandler extends OSProcessHandler implements Killable private final boolean myMediatedProcess; public KillableProcessHandler(@NotNull GeneralCommandLine commandLine) throws ExecutionException { - this(commandLine, false); + super(commandLine); + myMediatedProcess = MEDIATOR_KEY.get(commandLine) == Boolean.TRUE; } /** * Starts a process with a {@link RunnerMediator mediator} when {@code withMediator} is set to {@code true} and the platform is Windows. */ public KillableProcessHandler(@NotNull GeneralCommandLine commandLine, boolean withMediator) throws ExecutionException { - super(mediate(commandLine, withMediator)); - myMediatedProcess = withMediator && MEDIATOR_KEY.get(commandLine) == Boolean.TRUE; + this(mediate(commandLine, withMediator)); } /** @@ -70,7 +70,7 @@ public class KillableProcessHandler extends OSProcessHandler implements Killable @NotNull protected static GeneralCommandLine mediate(@NotNull GeneralCommandLine commandLine, boolean withMediator) { - if (withMediator && SystemInfo.isWindows) { + if (withMediator && SystemInfo.isWindows && MEDIATOR_KEY.get(commandLine) == null) { boolean mediatorInjected = RunnerMediator.injectRunnerCommand(commandLine); MEDIATOR_KEY.set(commandLine, mediatorInjected); }