Skip to content

Commit

Permalink
Add a AbstractTerminal#close() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jun 14, 2018
1 parent cde6119 commit 51c4621
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public void setSize(Size size) {
}

public void close() throws IOException {
super.close();
pty.setAttr(originalAttributes);
pty.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public void raise(Signal signal) {
}
}

public void close() throws IOException {
}

protected void echoSignal(Signal signal) {
ControlChar cc = null;
switch (signal) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ public void setSize(Size size) {
}

public void close() throws IOException {
super.close();
closing = true;
pump.interrupt();
ShutdownHooks.remove(closer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,4 @@ public void setSize(Size sz) {
size.copy(sz);
}

public void close() throws IOException {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ protected void processIOException(IOException ioException) {
}

public void close() throws IOException {
super.close();
try {
slaveReader.close();
} finally {
Expand Down

0 comments on commit 51c4621

Please sign in to comment.