MCPcopy Create free account
hub / github.com/arktypeio/arktype / killTree

Function killTree

ark/repo/testNextDev.ts:113–125  ·  view source on GitHub ↗
(child: ChildProcess)

Source from the content-addressed store, hash-verified

111
112// what the dev server's workers hold open, which a build's don't outlive
113const killTree = (child: ChildProcess) => {
114 if (child.pid === undefined || child.exitCode !== null) return
115 if (process.platform === "win32") {
116 spawnSync("taskkill", ["/pid", String(child.pid), "/T", "/F"])
117 return
118 }
119 try {
120 // the group it leads, as Turbopack's loader runs in processes of its own
121 process.kill(-child.pid, "SIGKILL")
122 } catch {
123 child.kill("SIGKILL")
124 }
125}
126
127interface Served {
128 status: number

Callers 1

stopMethod · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected