//
final JLineProcessor processor = new JLineProcessor(ansi, shell, reader, out);
//
InterruptHandler interruptHandler = new InterruptHandler(new Runnable() {
@Override
public void run() {
processor.interrupt();
}
});
interruptHandler.install();
//
Thread thread = new Thread(processor);
thread.setDaemon(true);
thread.start();