File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/org/truffleruby/stdlib/readline Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,12 @@ private String getType() {
160
160
161
161
public void close () {
162
162
try {
163
- readline .getTerminal ().close ();
163
+ final Terminal terminal = readline .getTerminal ();
164
+ if (terminal instanceof PosixSysTerminalKeepSignalHandlers ) {
165
+ ((PosixSysTerminalKeepSignalHandlers ) terminal ).customClose ();
166
+ } else {
167
+ terminal .close ();
168
+ }
164
169
} catch (IOException e ) {
165
170
throw CompilerDirectives .shouldNotReachHere (e );
166
171
}
Original file line number Diff line number Diff line change 17
17
import java .nio .charset .Charset ;
18
18
19
19
import org .graalvm .shadowed .org .jline .terminal .impl .AbstractPosixTerminal ;
20
+ import org .graalvm .shadowed .org .jline .terminal .impl .AbstractTerminal ;
20
21
import org .graalvm .shadowed .org .jline .terminal .spi .Pty ;
21
22
import org .graalvm .shadowed .org .jline .utils .NonBlocking ;
22
23
import org .graalvm .shadowed .org .jline .utils .NonBlockingInputStream ;
@@ -65,9 +66,9 @@ public PrintWriter writer() {
65
66
}
66
67
// Checkstyle: start
67
68
68
- @ Override
69
- public void close () throws IOException {
70
- super . close ();
69
+ /** {@link AbstractTerminal#close()} is final in JLine 3.14+ */
70
+ public void customClose () throws IOException {
71
+ close ();
71
72
// Do not call reader.close()
72
73
reader .shutdown ();
73
74
}
You can’t perform that action at this time.
0 commit comments