MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / trackChildProcess

Function trackChildProcess

packages/engine/src/utils/processTracker.ts:5–10  ·  view source on GitHub ↗
(proc: ChildProcess)

Source from the content-addressed store, hash-verified

3const tracked = new Set<ChildProcess>();
4
5export 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

Callers 7

runFFmpegFunction · 0.90
runFfmpegFunction · 0.85
spawnStreamingEncoderFunction · 0.85
extractVideoFramesRangeFunction · 0.85
encodeFramesFromDirFunction · 0.85

Calls 2

addMethod · 0.80
onceMethod · 0.80

Tested by

no test coverage detected