Correct Jython termination (PY-2591).

This commit is contained in:
Dmitry Trofimov
2011-05-19 18:28:08 +04:00
parent 8b4ec046e0
commit af3dceb243
3 changed files with 7 additions and 2 deletions
@@ -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();
@@ -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();
}
@@ -187,6 +187,10 @@ public class OSProcessHandler extends ProcessHandler {
}
protected void destroyProcessImpl() {
closeStreamsAndDestroyProcess();
}
protected void closeStreamsAndDestroyProcess() {
try {
closeStreams();
}