Function
killTree
(...procs: ChildProcessWithoutNullStreams[])
Source from the content-addressed store, hash-verified
| 182 | } |
| 183 | |
| 184 | function killTree(...procs: ChildProcessWithoutNullStreams[]): void { |
| 185 | for (const p of procs) { |
| 186 | if (!p.killed) { try { p.kill('SIGKILL'); } catch { /* gone */ } } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | async function waitProcessExit(pid: number, timeoutMs: number): Promise<boolean> { |
| 191 | return waitFor(() => !isAlive(pid), timeoutMs).then(() => true).catch(() => false); |
Tested by
no test coverage detected