Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable proper termination of ProcessServer #368

Merged
merged 1 commit into from
May 4, 2024

Conversation

FlorianKroiss
Copy link
Contributor

@FlorianKroiss FlorianKroiss commented Mar 21, 2024

It's currently not possible to stop the Debug Server, because the underlying ProcessServer does not support proper termination.

The following code is used to shutdown the process:
https://github.com/eclipse-platform/eclipse.platform/blob/ebe8db5d9d1c7d231be261d9fd5207dfc94ca9a0/debug/org.eclipse.debug.core/core/org/eclipse/debug/core/model/RuntimeProcess.java#L243-L293

The call to waitFor(...) queries the exit value of the process, which always throws an IllegalThreadStateException, indicating that the process is still running, and thus leading to a timeout. I changed the implementation, such that exitValue() returns zero, if the process has been terminated.

The easiest way to reproduce this is to start/stop the debug server via the Pydev menu. When stopping the server, the UI will freeze until the timeout occurs

@fabioz fabioz merged commit aab88a3 into fabioz:master May 4, 2024
1 check passed
@fabioz
Copy link
Owner

fabioz commented May 4, 2024

Just merged. Thanks for the fix.

@FlorianKroiss FlorianKroiss deleted the shutdown-debug-server branch May 6, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants