True once shutdown has been requested (e.g. first Ctrl-C in long-running mode).
Register a callback to be invoked during graceful shutdown.
Enter long-running mode where the first Ctrl-C sets a cooperative flag instead of exiting, and a third Ctrl-C forces exit.
Leave long-running mode, restoring default single Ctrl-C exit behavior.
Service allowing registration of callbacks for CLI shutdown.