Integrated: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade
Jan Lahoda
jlahoda at openjdk.org
Thu Jun 6 04:46:48 UTC 2024
On Wed, 5 Jun 2024 13:09:01 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> Some `Terminal` implementations in JLine reset signal handlers to defaults when `nativeSignals` is set to `true`. Traditionally, this setting was `false` by default, but has been changed for JLine 3.6.0 to `true`:
> https://github.com/jline/jline3/pull/971
>
> And recently was brought into the JDK via a JLine upgrade. The consequence is that shutdown handlers are no longer called on Ctrl-C, as the signal handler that runs the shutdown handlers is uninstalled is uninstalled.
>
> This patch proposes to adjust the configuration to set `false` to `nativeSignals` explicitly, on both places where we create new terminals.
>
> I was trying to create a test for this fairly hard, but I didn't find a way to write a test that would reliably fail without the patch and reliably pass with it.
This pull request has now been integrated.
Changeset: b3f540d3
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b3f540d354c4a4e2f2199019a2b880a373699560
Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod
8332921: Ctrl+C does not call shutdown hooks after JLine upgrade
Reviewed-by: asotona, vromero
-------------
PR: https://git.openjdk.org/jdk/pull/19559
More information about the kulla-dev
mailing list