/** * @license * Copyright 2026 Qwen Team * SPDX-License-Identifier: Apache-2.0 */ /** * True when `pid` belongs to a running process. * * `EPERM` means the process exists but belongs to another user: that is * still alive. A zombie answers the signal too, but it has exited and will * never act again, so it counts as dead. */ export declare function isPidAlive(pid: number): boolean; /** * The kernel's per-boot id, or null when it cannot be read. * * A success is cached, since it cannot change while this process lives. A * failure is not: the first read tends to land at a moment of descriptor * pressure, and caching that would disable reuse protection for good. */ export declare function readLocalBootId(): string | null; /** * `:` for `pid` on Linux, or null. * * Start ticks separate two processes that shared a PID within one boot; the * boot id separates boots, and with them machines. Without the boot id this * returns null rather than bare ticks, so one machine never writes two * token shapes that a reader could mistake for a mismatch. */ export declare function readProcStartToken(pid: number): string | null; /** The inode of this process's PID namespace on Linux, or null. */ export declare function readPidNamespaceId(): number | null; /** The boot id inside a start token, or null for a token without one. */ export declare function bootIdOf(procStart: string): string | null; /** * True when `pid` is alive and is the process that recorded `procStart`. * * A missing token on either side degrades to plain liveness: declaring a * live session dead is the worse mistake. */ export declare function isSameProcess(pid: number, procStart: string | null | undefined): boolean;