* Send exit event to renderer
(processId: string, exitCode: number | null, signal: string | null)
| 268 | * Send exit event to renderer |
| 269 | */ |
| 270 | function sendExit(processId: string, exitCode: number | null, signal: string | null): void { |
| 271 | const proc = activeProcesses.get(processId) |
| 272 | if (!proc) return |
| 273 | |
| 274 | proc.completed = true |
| 275 | proc.completedAt = Date.now() |
| 276 | proc.exitCode = exitCode |
| 277 | proc.signal = signal |
| 278 | |
| 279 | emitLifecycle({ type: "exit", processId, exitCode, signal }) |
| 280 | |
| 281 | // Schedule cleanup |
| 282 | scheduleCleanup(processId) |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Send error event to renderer |
no test coverage detected