MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / childPids

Function childPids

graph-ui/tools/lib/socket-sampler.mjs:35–43  ·  view source on GitHub ↗
(pid)

Source from the content-addressed store, hash-verified

33const execFileAsync = promisify(execFile);
34
35async function childPids(pid) {
36 try {
37 const { stdout } = await execFileAsync('pgrep', ['-P', String(pid)]);
38 return stdout.split('\n').map((line) => line.trim()).filter(Boolean).map(Number);
39 } catch {
40 // pgrep endet mit 1, wenn es keine Kinder gibt. Das ist der Normalfall.
41 return [];
42 }
43}
44
45/** Der Prozessbaum unter (und einschliesslich) pid. */
46async function processTree(pid) {

Callers 1

processTreeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected