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

Function killOrphanedProcesses

packages/cli/src/utils/orphanCleanup.ts:18–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16 * Returns the count of killed process trees.
17 */
18export function killOrphanedProcesses(): number {
19 if (process.platform === "win32") return 0;
20
21 let killed = 0;
22
23 for (const name of ["chrome-headless-shell", "chrome_headless_shell"]) {
24 killed += killOrphansByName(name);
25 }
26
27 killed += killOrphansByName("puppeteer_dev_chrome_profile");
28
29 return killed;
30}
31
32/**
33 * Kill an entire process tree rooted at `pid`. Walks descendants

Callers 2

runFunction · 0.85

Calls 1

killOrphansByNameFunction · 0.85

Tested by

no test coverage detected