Skip to content

Commit e3a7b10

Browse files
committed
8332921: Ctrl+C does not call shutdown hooks after JLine upgrade
Reviewed-by: phh Backport-of: b3f540d354c4a4e2f2199019a2b880a373699560
1 parent 63bfa0b commit e3a7b10

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ public class JdkConsoleProviderImpl implements JdkConsoleProvider {
5151
public JdkConsole console(boolean isTTY, Charset charset) {
5252
try {
5353
Terminal terminal = TerminalBuilder.builder().encoding(charset)
54-
.exec(false).build();
54+
.exec(false)
55+
.nativeSignals(false)
56+
.build();
5557
return new JdkConsoleImpl(terminal);
5658
} catch (IllegalStateException ise) {
5759
//cannot create a non-dumb, non-exec terminal,

src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public int readBuffered(byte[] b) throws IOException {
158158
terminal = TerminalBuilder.builder().inputStreamWrapper(in -> {
159159
input.setInputStream(in);
160160
return nonBlockingInput;
161-
}).build();
161+
}).nativeSignals(false).build();
162162
useComplexDeprecationHighlight = !OSUtils.IS_WINDOWS;
163163
}
164164
this.allowIncompleteInputs = allowIncompleteInputs;

0 commit comments

Comments
 (0)