Open philiprichens opened 7 months ago
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 git-bisect
on jline between 3.21.0 and 3.25.0 and pinpoint the exact problem.
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.