(pid: number, name: NodeJS.Signals)
| 12 | }; |
| 13 | |
| 14 | const signal = (pid: number, name: NodeJS.Signals): void => { |
| 15 | // Auto-started daemons are detached process-group leaders. Signal the whole |
| 16 | // private group so their Vite child cannot survive a failed test. |
| 17 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: Windows and pre-detach failures require a direct-pid fallback |
| 18 | try { |
| 19 | process.kill(process.platform === "win32" ? pid : -pid, name); |
| 20 | } catch { |
| 21 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- cleanup tolerates a process that exited between the liveness check and signal |
| 22 | try { |
| 23 | process.kill(pid, name); |
| 24 | } catch {} |
| 25 | } |
| 26 | }; |
| 27 | |
| 28 | const waitUntilStopped = async (pid: number, timeoutMs: number): Promise<boolean> => { |
| 29 | const deadline = performance.now() + timeoutMs; |
no outgoing calls
no test coverage detected