silent destroy if no process
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Thu, 29 Jan 2015 11:16:00 +0000 (12:16 +0100)
committerVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Thu, 29 Jan 2015 12:03:55 +0000 (13:03 +0100)
platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/DebugProcessImpl.java

index 4a680f7c598b006118ff47feeee3f668ce9fb806..0afe3d26396aa11be110a904ca9011f35b884fd8 100644 (file)
@@ -7,6 +7,7 @@ import com.intellij.util.Url;
 import com.intellij.util.containers.ContainerUtil;
 import com.intellij.util.io.socketConnection.ConnectionStatus;
 import com.intellij.util.io.socketConnection.SocketConnectionListener;
+import com.intellij.xdebugger.DefaultDebugProcessHandler;
 import com.intellij.xdebugger.XDebugProcess;
 import com.intellij.xdebugger.XDebugSession;
 import com.intellij.xdebugger.XExpression;
@@ -263,6 +264,13 @@ public abstract class DebugProcessImpl<C extends VmConnection> extends XDebugPro
 
   @Override
   protected final ProcessHandler doGetProcessHandler() {
-    return executionResult != null ? executionResult.getProcessHandler() : null;
+    return executionResult == null ? new SilentDestroyDebugProcessHandler() : executionResult.getProcessHandler();
+  }
+
+  private static final class SilentDestroyDebugProcessHandler extends DefaultDebugProcessHandler {
+    @Override
+    public boolean isSilentlyDestroyOnClose() {
+      return true;
+    }
   }
 }
\ No newline at end of file