/** * Windows Process Tree Utility Module * * This module provides process tree management utilities specifically for Windows. * It handles the case where shell: true spawns cmd.exe which then spawns * the actual working process (like node.exe, python.exe, etc.). * * On non-Windows platforms, all methods return safe default values * and don't perform any actual operations. */ /** * Gets all child process IDs for a given parent PID on Windows. * * @param pid - Parent process ID @returns Promise resolving to array of child PID */ export declare function getChildren(pid: number): Promise; /** * Gets the entire process tree (all descendants) for a given PID. * Includes the original PID at the beginning of the array. * * @param pid - Root process ID * @returns Array of all process IDs in the tree */ export declare function getProcessTree(pid: number): Promise; /** * Checks if any process in the process tree is still running. * * @param pid - Root process ID * @returns True if any process in the tree is running */ export declare function isAnyInTreeRunning(pid: number): Promise; /** * Tries to find the actual working process PID in the tree. * This looks for processes that are likely the actual worker * (node.exe, python.exe, etc.) rather than shell processes. * * @param pid - Root process ID * @returns Working process PID if found, undefined otherwise */ export declare function getWorkingProcessPid(pid: number): Promise; /** * Kills the entire process tree. * * @param pid - Root process ID * @param signal - Signal to send (default: SIGTERM) */ export declare function killProcessTree(pid: number, signal?: NodeJS.Signals): Promise; //# sourceMappingURL=process-tree.d.ts.map