private void handleSignal(Terminal.Signal signal) {
    switch (signal) {
      case INT:
      case QUIT:
        keepRunning = false;
        break;
      case TSTP:
        paused = true;
        break;
      case CONT:
        paused = false;
        break;
      case WINCH:
        updateTerminalSize();
        break;
    }
  }
A scrolling (logging) view of the query result of a streaming SELECT statement.
samza-sql-shell/src/main/java/org/apache/samza/sql/client/cli/QueryResultLogView.java