@flowscripter/dynamic-cli-framework
    Preparing search index...

    Interface ShutdownService

    Service allowing registration of callbacks for CLI shutdown.

    interface ShutdownService {
        isShutdownRequested: boolean;
        addShutdownListener(callback: () => Promise<void>): void;
        enterLongRunningMode(): void;
        leaveLongRunningMode(): void;
    }

    Implemented by

    Index
    isShutdownRequested: boolean

    True once shutdown has been requested (e.g. first Ctrl-C in long-running mode).

    • Register a callback to be invoked during graceful shutdown.

      Parameters

      • callback: () => Promise<void>

      Returns void

    • Enter long-running mode where the first Ctrl-C sets a cooperative flag instead of exiting, and a third Ctrl-C forces exit.

      Returns void

    • Leave long-running mode, restoring default single Ctrl-C exit behavior.

      Returns void