diff --git a/terminal/src/main/java/org/jline/terminal/impl/AbstractPosixTerminal.java b/terminal/src/main/java/org/jline/terminal/impl/AbstractPosixTerminal.java index 0b0bec816..4994f1aa1 100644 --- a/terminal/src/main/java/org/jline/terminal/impl/AbstractPosixTerminal.java +++ b/terminal/src/main/java/org/jline/terminal/impl/AbstractPosixTerminal.java @@ -72,6 +72,7 @@ public void setSize(Size size) { } public void close() throws IOException { + super.close(); pty.setAttr(originalAttributes); pty.close(); } diff --git a/terminal/src/main/java/org/jline/terminal/impl/AbstractTerminal.java b/terminal/src/main/java/org/jline/terminal/impl/AbstractTerminal.java index 1648a19f6..6245b41e4 100644 --- a/terminal/src/main/java/org/jline/terminal/impl/AbstractTerminal.java +++ b/terminal/src/main/java/org/jline/terminal/impl/AbstractTerminal.java @@ -70,6 +70,9 @@ public void raise(Signal signal) { } } + public void close() throws IOException { + } + protected void echoSignal(Signal signal) { ControlChar cc = null; switch (signal) { diff --git a/terminal/src/main/java/org/jline/terminal/impl/AbstractWindowsTerminal.java b/terminal/src/main/java/org/jline/terminal/impl/AbstractWindowsTerminal.java index 00878b852..e30c6cc67 100644 --- a/terminal/src/main/java/org/jline/terminal/impl/AbstractWindowsTerminal.java +++ b/terminal/src/main/java/org/jline/terminal/impl/AbstractWindowsTerminal.java @@ -215,6 +215,7 @@ public void setSize(Size size) { } public void close() throws IOException { + super.close(); closing = true; pump.interrupt(); ShutdownHooks.remove(closer); diff --git a/terminal/src/main/java/org/jline/terminal/impl/DumbTerminal.java b/terminal/src/main/java/org/jline/terminal/impl/DumbTerminal.java index 4a2be1f4a..9affe3e14 100644 --- a/terminal/src/main/java/org/jline/terminal/impl/DumbTerminal.java +++ b/terminal/src/main/java/org/jline/terminal/impl/DumbTerminal.java @@ -126,7 +126,4 @@ public void setSize(Size sz) { size.copy(sz); } - public void close() throws IOException { - } - } diff --git a/terminal/src/main/java/org/jline/terminal/impl/LineDisciplineTerminal.java b/terminal/src/main/java/org/jline/terminal/impl/LineDisciplineTerminal.java index 1efef78f8..eafee592c 100644 --- a/terminal/src/main/java/org/jline/terminal/impl/LineDisciplineTerminal.java +++ b/terminal/src/main/java/org/jline/terminal/impl/LineDisciplineTerminal.java @@ -234,6 +234,7 @@ protected void processIOException(IOException ioException) { } public void close() throws IOException { + super.close(); try { slaveReader.close(); } finally {