MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / signalTree

Function signalTree

e2e/setup/boot.ts:49–56  ·  view source on GitHub ↗
(child: ChildProcess, signal: NodeJS.Signals)

Source from the content-addressed store, hash-verified

47 // Signal the process GROUP (negative pid); fall back to the direct child
48 // when the group is already gone.
49 const signalTree = (child: ChildProcess, signal: NodeJS.Signals) => {
50 if (child.pid === undefined || child.exitCode !== null) return;
51 try {
52 process.kill(-child.pid, signal);
53 } catch {
54 child.kill(signal);
55 }
56 };
57
58 const exited = (child: ChildProcess): Promise<void> =>
59 child.exitCode !== null || child.signalCode !== null

Callers 1

bootProcessesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected