(proc: ChildProcess)
| 3 | const tracked = new Set<ChildProcess>(); |
| 4 | |
| 5 | export function trackChildProcess(proc: ChildProcess): void { |
| 6 | tracked.add(proc); |
| 7 | const remove = () => tracked.delete(proc); |
| 8 | proc.once("exit", remove); |
| 9 | proc.once("error", remove); |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * SIGTERM all tracked child processes, then SIGKILL any that survive |
no test coverage detected