@Override public void close() { try { terminal.close(); } catch (final IOException e) { // Swallow } }
@Override public void close() throws IOException { terminal.close(); }
public void exit() throws Exception { terminal.close(); } };
@Override public void close() throws IOException { terminal.close(); }
@Override public void close() throws IOException { delegate().close(); } }
@Override public void close() throws IOException { delegate().close(); } }
/** * <p>Stops this progress bar, effectively stops tracking the underlying process.</p> * <p>Implements the {@link AutoCloseable} interface which enables the try-with-resource * pattern with progress bars.</p> * @since 0.7.0 */ @Override public void close() { target.kill(); try { thread.join(); target.consoleStream.print("\n"); target.consoleStream.flush(); target.terminal.close(); } catch (InterruptedException | IOException ignored) { } }
/** * <p>Stops this progress bar, effectively stops tracking the underlying process.</p> * <p>Implements the {@link AutoCloseable} interface which enables the try-with-resource * pattern with progress bars.</p> * @since 0.7.0 */ @Override public void close() { target.kill(); try { thread.join(); target.consoleStream.print("\n"); target.consoleStream.flush(); target.terminal.close(); } catch (InterruptedException | IOException ignored) { } }
shell.stop(); try { terminal.close(); } catch (IOException e) {
getReader().getTerminal().close(); } catch (IOException e) { ctx.printThrowable(e);
private void runShell(CommandSession session, Terminal terminal) { InputStream in = terminal.input(); OutputStream out = terminal.output(); CommandSession newSession = processor.createSession(in, out, out); newSession.put(Shell.VAR_TERMINAL, terminal); newSession.put(".tmux", session.get(".tmux")); Context context = new Context() { public String getProperty(String name) { return System.getProperty(name); } public void exit() throws Exception { terminal.close(); } }; try { new Shell(context, processor).gosh(newSession, new String[]{"--login"}); } catch (Exception e) { e.printStackTrace(); } finally { try { terminal.close(); } catch (IOException e) { e.printStackTrace(); } } }
terminal.close(); } catch (IOException e) {