(child: ChildProcess | null | undefined)
| 79 | let runtimeHostsShuttingDown = false |
| 80 | |
| 81 | function terminateHostProcess(child: ChildProcess | null | undefined) { |
| 82 | if (!child || child.killed || child.exitCode !== null) return |
| 83 | |
| 84 | if (process.platform === 'win32' && child.pid) { |
| 85 | const taskkill = spawn('taskkill.exe', ['/pid', String(child.pid), '/t', '/f'], { |
| 86 | stdio: 'ignore', |
| 87 | windowsHide: true, |
| 88 | }) |
| 89 | taskkill.unref() |
| 90 | return |
| 91 | } |
| 92 | |
| 93 | child.kill('SIGTERM') |
| 94 | } |
| 95 | |
| 96 | function killAllRuntimeHosts() { |
| 97 | for (const host of hosts) { |
no test coverage detected