()
| 470 | export async function stopSidecar(child: ChildProcess): Promise<void> { |
| 471 | expectedExits.add(child); |
| 472 | const cleanupManifest = () => { |
| 473 | if (!child.pid) return; |
| 474 | const dataDir = sidecarManifestPathByPid.get(child.pid); |
| 475 | if (!dataDir) return; |
| 476 | removeManifestIfOwnedBy(dataDir, child.pid); |
| 477 | sidecarManifestPathByPid.delete(child.pid); |
| 478 | }; |
| 479 | if (child.exitCode !== null || child.killed) { |
| 480 | cleanupManifest(); |
| 481 | return; |
no test coverage detected