RFR: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade [v2]
Vicente Romero
vromero at openjdk.org
Wed Jun 5 18:14:59 UTC 2024
On Wed, 5 Jun 2024 17:29:13 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.
>
> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>
> - Merge branch 'master' into JDK-8332921
> - 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19559#pullrequestreview-2099920001
More information about the kulla-dev
mailing list