/** * Run a callback while tracking its spawned subprocess groups, then terminate * every surviving group before returning. * * @template T * @param {() => Promise} callback * @param {{termTimeoutMs?: number}} [options] * @returns {Promise} */ export function withOwnedProcessTree(callback: () => Promise, options?: { termTimeoutMs?: number; }): Promise; /** * @param {{termTimeoutMs?: number, procRoot?: string}} [options] * @returns {{run: (callback: () => Promise) => Promise, close: () => Promise}} */ export function createOwnedProcessTree({ termTimeoutMs, procRoot }?: { termTimeoutMs?: number; procRoot?: string; }): { run: (callback: () => Promise) => Promise; close: () => Promise; }; /** Spawn normally, or as a tracked process-group leader in an owned scope. */ export const spawnOwnedProcess: typeof spawn; import { spawn } from "node:child_process"; //# sourceMappingURL=owned-process-tree.d.ts.map