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

Function emitLifecycle

projects/electron/src/modules/code/process.ts:183–191  ·  view source on GitHub ↗
(event: ProcessLifecycleEvent)

Source from the content-addressed store, hash-verified

181}
182
183function emitLifecycle(event: ProcessLifecycleEvent): void {
184 for (const listener of lifecycleListeners) {
185 try {
186 listener(event)
187 } catch (error) {
188 logger.warn("[Process] Lifecycle listener failed", error)
189 }
190 }
191}
192
193export function addProcessLifecycleListener(listener: (event: ProcessLifecycleEvent) => void): () => void {
194 lifecycleListeners.add(listener)

Callers 6

sendOutputFunction · 0.70
sendExitFunction · 0.70
sendErrorFunction · 0.70
handleStartCommandFunction · 0.70
handleStartScriptFunction · 0.70
cleanupFunction · 0.70

Calls 1

listenerFunction · 0.50

Tested by

no test coverage detected