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

Function signalTree

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

Source from the content-addressed store, hash-verified

126 // Signal the process GROUP (negative pid); fall back to the direct child
127 // when the group is already gone.
128 const signalTree = (child: ChildProcess, signal: NodeJS.Signals) => {
129 if (child.pid === undefined || child.exitCode !== null) return;
130 try {
131 process.kill(-child.pid, signal);
132 } catch {
133 child.kill(signal);
134 }
135 };
136
137 const exited = (child: ChildProcess): Promise<void> =>
138 child.exitCode !== null || child.signalCode !== null

Callers 1

bootProcessesFunction · 0.85

Calls 1

killMethod · 0.80

Tested by

no test coverage detected