Correct Jython termination (PY-2591).
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Thu, 19 May 2011 11:20:02 +0000 (15:20 +0400)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Thu, 19 May 2011 14:28:08 +0000 (18:28 +0400)
platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java
platform/platform-api/src/com/intellij/execution/configurations/GeneralCommandLine.java
platform/platform-api/src/com/intellij/execution/process/OSProcessHandler.java

index 01033af290639f31b8fad1cba4d7d5b0d719def7..0492e2ef05e9f48c16a6e44e0af8caae69903ed8 100644 (file)
@@ -102,7 +102,7 @@ public abstract class AbstractConsoleRunnerWithHistory<T extends LanguageConsole
     myConsoleView = createConsoleView();
     myConsoleView.setBorder(new SideBorder(UIUtil.getBorderColor(), SideBorder.LEFT));
 
-      myProcessHandler = createProcessHandler(process, myProvider.getCommandLineString());
+    myProcessHandler = createProcessHandler(process, myProvider.getCommandLineString());
 
     myConsoleExecuteActionHandler = createConsoleExecuteActionHandler();
 
index 15638e2ece61a5086b6bf780c9605eede5aab44a..3e7a4e54192eca2f4cb12f07e6fa0825664ab51b 100644 (file)
@@ -19,6 +19,7 @@ import com.intellij.execution.ExecutionException;
 import com.intellij.execution.process.ProcessNotCreatedException;
 import com.intellij.ide.IdeBundle;
 import com.intellij.openapi.util.SystemInfo;
+import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.vfs.CharsetToolkit;
 import com.intellij.util.containers.HashMap;
 import org.jetbrains.annotations.NonNls;
@@ -85,7 +86,7 @@ public class GeneralCommandLine {
   }
 
   public String getCommandLineString() {
-    final StringBuffer buffer = new StringBuffer(quoteParameter(myExePath));
+    final StringBuffer buffer = new StringBuffer(quoteParameter(FileUtil.toSystemDependentName(myExePath)));
     appendParams( buffer );
     return buffer.toString();
   }
index 6af6faa6fa79cec692508c51bd398533984024be..043b6519080aab48a40c554a02a2aa757ba0d5cd 100644 (file)
@@ -187,6 +187,10 @@ public class OSProcessHandler extends ProcessHandler {
   }
 
   protected void destroyProcessImpl() {
+    closeStreamsAndDestroyProcess();
+  }
+
+  protected void closeStreamsAndDestroyProcess() {
     try {
       closeStreams();
     }