private void pollAgentForPendingShutdown(final Agent agent) throws Exception {
    while (true) {
      pause(500);
      spinReadStatus();

      if (isStatus(SHUTDOWN_PENDING, SHUTDOWN_PENDING_AFTER_FAILED_STARTUP)) {
        agent.stop();
        final ExitCode exitCode =
            (isStatus(SHUTDOWN_PENDING_AFTER_FAILED_STARTUP) ? ExitCode.FATAL : ExitCode.NORMAL);
        writeStatus(createStatus(status, SHUTDOWN));
        exitCode.doSystemExit();
      }
    }
  }
Notes that an error has occurred in the agent and that it has shut down because of it.
geode-core/src/main/java/org/apache/geode/admin/jmx/internal/AgentLauncher.java