/** * ProcessManager - Utilities for managing server processes * * Provides cross-platform process management including: * - PID file management * - Process termination (graceful and forced) * - Port reclamation * - Parent process detection */ /** * Check if a process is alive by sending signal 0 */ export declare const isProcessAlive: (pid: number) => boolean; /** * Terminate a process by PID with graceful fallback to forceful termination */ export declare const terminateProcessByPid: (pid: number) => Promise; /** * Read PID from a file */ export declare const readPidFile: (pidFilePath: string) => number | undefined; /** * Write PID to a file */ export declare const writePidFile: (pidFilePath: string, pid: number) => void; /** * Remove PID file */ export declare const removePidFile: (pidFilePath: string) => void; /** * Get PIDs listening on a port (cross-platform) */ export declare const getListeningPids: (port: number) => number[]; /** * Get parent process info (cross-platform) */ export declare const getParentProcessInfo: (pid: number) => { ppid: number | null; command: string | null; } | null; type ParentProcessInfo = { ppid: number | null; command: string | null; } | null; /** * Collect processes to terminate, including relevant parents */ export declare const collectProcessesToTerminate: (pids: number[], resolver: (pid: number) => ParentProcessInfo) => number[]; /** * Reclaim a port by terminating processes using it */ export declare const reclaimPort: (port: number) => Promise; export {}; //# sourceMappingURL=ProcessManager.d.ts.map