MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / collectLinuxChildPids

Function collectLinuxChildPids

common/src/process_tools.ts:154–164  ·  view source on GitHub ↗
(pid: number)

Source from the content-addressed store, hash-verified

152}
153
154function collectLinuxChildPids(pid: number): number[] {
155 const childPids = listLinuxChildPids(pid);
156 const result: number[] = [];
157
158 for (const childPid of childPids) {
159 result.push(...collectLinuxChildPids(childPid));
160 result.push(childPid);
161 }
162
163 return result;
164}
165
166function listLinuxChildPids(pid: number): number[] {
167 const procChildren = readLinuxChildrenFromProc(pid);

Callers 1

killLinuxProcessTreeFunction · 0.85

Calls 2

listLinuxChildPidsFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected