/** * The daemon's shutdown sequence with a DEADLINE (crew#471). * * `wicked-crew serve` answered SIGTERM by reaping its bridge children and closing the engine * subscription, then exiting. While the engine's actor was busy planning a large launch those * steps never finished, so the daemon ignored `pkill` and needed SIGKILL. The steps still run * first, best-effort; when they have not finished within the deadline the process exits anyway. */ /** How long the graceful half of a shutdown may take before the process exits regardless. */ export declare const SHUTDOWN_DEADLINE_MS = 5000; /** * Run `steps`, then `exit(0)`, and `exit(0)` at `deadlineMs` if the steps are still running. * A step that throws never blocks the exit. `exit` is called exactly once. */ export declare function shutdownWithDeadline(steps: () => Promise, exit: (code: number) => void, deadlineMs?: number, warn?: (message: string) => void): void; //# sourceMappingURL=shutdown.d.ts.map