diff --git a/plugins/com.python.pydev.debug/src/com/python/pydev/debug/model/ProcessServer.java b/plugins/com.python.pydev.debug/src/com/python/pydev/debug/model/ProcessServer.java index 094ab4afae..863f510060 100644 --- a/plugins/com.python.pydev.debug/src/com/python/pydev/debug/model/ProcessServer.java +++ b/plugins/com.python.pydev.debug/src/com/python/pydev/debug/model/ProcessServer.java @@ -29,6 +29,7 @@ public class ProcessServer extends Process { private PipedInputStream errorStream; private OutputStream outputStream; private Object lock; + private boolean exited = false; public ProcessServer() { super(); @@ -73,6 +74,9 @@ public int waitFor() throws InterruptedException { @Override public int exitValue() { + if (exited) { + return 0; + } throw new IllegalThreadStateException(); } @@ -111,6 +115,8 @@ public void destroy() { } catch (Exception e) { Log.log(e); } + + exited = true; } /**