Skip to content

Commit b3f540d

Browse files
committed
8332921: Ctrl+C does not call shutdown hooks after JLine upgrade
Reviewed-by: asotona, vromero
1 parent 3089412 commit b3f540d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ private synchronized JdkConsole initializeJLineDelegate() {
164164
try {
165165
Terminal terminal = TerminalBuilder.builder().encoding(charset)
166166
.exec(false)
167+
.nativeSignals(false)
167168
.systemOutput(SystemOutput.SysOut)
168169
.build();
169170
newDelegate = new JdkConsoleImpl(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)