restore terminal flags, fix hanging issue #1412 (#1415)

pull/1417/head
gongdewei 5 years ago committed by GitHub
parent 3079869dc9
commit 191b7979be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -335,9 +335,11 @@ public class TelnetConsole {
return STATUS_OK;
} finally {
//reset terminal setting, fix https://github.com/alibaba/arthas/issues/1412
terminal.enableInterruptCharacter();
if (terminal instanceof UnixTerminal) {
((UnixTerminal) terminal).enableLitteralNextCharacter();
try {
terminal.restore();
} catch (Exception e) {
System.out.println("Restore terminal settings failure: "+e.getMessage());
e.printStackTrace();
}
}

Loading…
Cancel
Save