-
Notifications
You must be signed in to change notification settings - Fork 219
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
CTRL-C EXITS APPLICATION EVEN WHEN HANDLED #938
Comments
Could you try with 3.25.1 ? I've fixed a bunch of bugs in there. |
I'm afraid it is still showing up when I run with 3.25.1. |
Looks duplicated by #940 |
Seems maybe Windows specific? I can't reproduce this on a Linux box with the provided test program (both on 3.25.0 and 3.25.1). |
Yes, I agree, it is Windows specific. |
@philiprichens reproducer seems to work for me: Not sure how to address the issue. One possibility if you have a bit of time would be to performa a Could this also be related to the JDK used ? I was using OpenJDK 21.0.2 in the above test. |
I tried again, but I cannot reproduce it on windows 11 + cmd console. |
I also played with this when I was poking other windows related issues. I was on jdk17 so while possible probably not jdk related thing. Almost feels like windows terminal related issue which also feels weird as it doesn't update that often via official channel. It'd be nice to see this sample in a repo to actually run same code. |
I have attached a short test program which shows the issue with CTRL-C handling in 3.25.0. The program has a handler for Terminal.Signal.INT and it also catches UserInterruptException.
In 3.21, when I press CTRL-C, either the handler is invoked or the UserInterruptException is caught and I can process the CTRL-C and continue with the read loop.
In 3.25.0 (on Windows at least), the exception is thrown and at the same time the application is exited. This makes the application unusable.
As well as the test program I've attached screen shots showing the behaviour in both 3.21.0 and 3.25.0.
The text was updated successfully, but these errors were encountered: