Skip to main content

installSignalHandlers

@forge/monorepo


@forge/monorepo / backend/src / installSignalHandlers

Function: installSignalHandlers()

installSignalHandlers(runtime, options?): () => void

Defined in: backend/src/worker/main.ts:239

Attach OS signal handlers. Separate from createWorkerRuntime on purpose: a library that binds to process merely by being constructed is hostile to embed and to test, and every test here would otherwise need real signals.

Parameters

runtime

WorkerRuntime

options?

onExit?

(code) => void

process?

Pick<Process, "on">

signals?

readonly Signals[]

Returns

() => void