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

    Interface ShutdownService

    Service allowing registration of prioritised tasks to run during CLI shutdown.

    interface ShutdownService {
        isShutdownRequested: boolean;
        enterLongRunningMode(): void;
        leaveLongRunningMode(): void;
        registerTask(task: ShutdownTask): void;
    }

    Implemented by

    Index
    isShutdownRequested: boolean

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

    • 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

    • Register a ShutdownTask to run during graceful shutdown.

      Parameters

      Returns void