/** * Child process lifecycle management — extracted from runner.ts. * * Process group registration, signal propagation, and * single-child termination helpers. */ import { type ChildProcess } from "node:child_process"; export declare const isWindows: boolean; export declare const SIGKILL_TIMEOUT_MS = 5000; /** Register a child process group for cleanup on shutdown. */ export declare function registerChildGroup(pid: number, name: string): void; /** Unregister a completed/stopped child process group. */ export declare function unregisterChildGroup(pid: number): void; /** * Terminate all registered child process groups via SIGTERM (then SIGKILL after timeout). * Called on parent exit, SIGINT, SIGTERM, or pi-agent-flow:shutdown. */ export declare function terminateAllChildGroups(): void; /** * Terminate a single child process with SIGTERM then SIGKILL fallback. * Handles both Windows (taskkill) and Unix (process group) semantics. */ export declare function terminateChildProcess(proc: ChildProcess, options?: { endStdin?: () => void; timeoutMs?: number; skipIfClosed?: () => boolean; }): void; //# sourceMappingURL=process-lifecycle.d.ts.map