import { spawnSync } from "node:child_process";
export interface ProcessTreeKillOptions {
    platform?: NodeJS.Platform;
    kill?: typeof process.kill;
    spawnSync?: typeof spawnSync;
    env?: NodeJS.ProcessEnv;
    taskkillTimeoutMs?: number;
}
/**
 * Absolute path to `taskkill.exe`.
 *
 * Bare `"taskkill"` depends on `System32` being on PATH — not guaranteed for a
 * GUI-launched app whose PATH we also mutate — and is spoofable by a
 * `taskkill.exe` sitting in the project cwd. Resolve it from `SystemRoot`
 * (falling back to `WINDIR`, then `C:\Windows`), rejecting anything that isn't
 * a plain drive-rooted path.
 */
export declare function resolveWindowsTaskkillPath(env?: NodeJS.ProcessEnv): string;
/**
 * Kill a process and every descendant.
 *
 * POSIX: SIGKILL the process group (negative pid), falling back to the single
 * pid. Windows has no process groups and negative pids are invalid there — the
 * POSIX path silently left the whole child tree running, so a timed-out or
 * cancelled `bash` command kept its `npm`/`node`/`pnpm` descendants alive
 * forever. Use `taskkill /T /F` instead, falling back to the direct pid.
 */
export declare function killProcessTree(pid: number, options?: ProcessTreeKillOptions): void;
//# sourceMappingURL=process.d.ts.map