From 207168dedf70e2dcb1ded0f7e1dde5259cd6a8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kroi=C3=9F=2C=20Florian?= Date: Thu, 21 Mar 2024 14:34:38 +0100 Subject: [PATCH] Enable proper termination of ProcessServer. --- .../src/com/python/pydev/debug/model/ProcessServer.java | 6 ++++++ 1 file changed, 6 insertions(+) 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; } /**