Function
killTree
(...procs: ChildProcessWithoutNullStreams[])
Source from the content-addressed store, hash-verified
| 156 | } |
| 157 | |
| 158 | function killTree(...procs: ChildProcessWithoutNullStreams[]): void { |
| 159 | for (const p of procs) { |
| 160 | if (!p.killed) { try { p.kill('SIGKILL'); } catch { /* gone */ } } |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | async function waitProcessExit(pid: number, timeoutMs: number): Promise<boolean> { |
| 165 | return waitFor(() => !isAlive(pid), timeoutMs).then(() => true).catch(() => false); |
Tested by
no test coverage detected