/** Probe whether a PID is alive. Signal 0 performs the permission/existence check * without actually delivering a signal; a throw (ESRCH/EPERM-as-dead handled by caller) * means the process is not addressable as a live, signalable target. */ export declare function isProcessAlive(pid: number): boolean; export interface AcquireResult { acquired: boolean; /** Set when acquired === true: whether a stale/corrupt lock was reclaimed. */ stale?: boolean; /** Set when acquired === false: the PID currently holding the lock. */ holderPid?: number; } /** * Attempt to take a PID-file singleton lock. * - File missing → write own pid, { acquired: true, stale: false } * - File holds a live, valid pid → { acquired: false, holderPid } * - File holds a dead/corrupt pid → overwrite with own pid, { acquired: true, stale: true } * * This function never exits the process or logs — the caller decides how to react to a * conflict (typically: log a message and process.exit(1)). */ export declare function tryAcquireSingletonLock(pidFile: string): AcquireResult; /** Release the lock iff it is still owned by the current process. Best-effort; swallows errors. */ export declare function releaseSingletonLock(pidFile: string): void;