MCPcopy Create free account
hub / github.com/bearlyai/OpenADE / sendExit

Function sendExit

projects/electron/src/modules/code/process.ts:270–283  ·  view source on GitHub ↗

* Send exit event to renderer

(processId: string, exitCode: number | null, signal: string | null)

Source from the content-addressed store, hash-verified

268 * Send exit event to renderer
269 */
270function 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

Callers 1

setupProcessHandlersFunction · 0.70

Calls 3

emitLifecycleFunction · 0.70
scheduleCleanupFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected