/** * Close the jLine terminal when needed * * @throws IOException when closing failed */ public static void close() throws IOException { if (terminal != null) { terminal.reader().shutdown(); /*try { terminal.close(); } finally { terminal = null; }*/ } }
@Override public void close() throws IOException { ShutdownHooks.remove(closer); for (Map.Entry<Signal, Object> entry : nativeHandlers.entrySet()) { Signals.unregister(entry.getKey().name(), entry.getValue()); } super.close(); // Do not call reader.close() reader.shutdown(); }