@Override
    public void promptLoop() {
      lock.lock();
      try {
        try {
          endOfShell.await();
        } catch (InterruptedException ignore) {
        }
        exitShellRequest = ExitShellRequest.NORMAL_EXIT;
        setShellStatus(Status.SHUTTING_DOWN);
      } finally {
        lock.unlock();
      }
    }
We override this method just to fool runner thread in reading from nothing. It waits for
Condition endOfShell which is signalled when terminate is called. This achieves clean
shutdown of runner thread.
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/HeadlessGfsh.java