MCPcopy Create free account
hub / github.com/Noumena-Network/code / sigintHandler

Function sigintHandler

src/cli/print.ts:1040–1046  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1038 // gracefulShutdown persists session state and flushes analytics, with a
1039 // failsafe timer that force-exits if cleanup hangs.
1040 const sigintHandler = () => {
1041 logForDiagnosticsNoPII('info', 'shutdown_signal', { signal: 'SIGINT' })
1042 if (abortController && !abortController.signal.aborted) {
1043 abortController.abort()
1044 }
1045 void gracefulShutdown(0)
1046 }
1047 process.on('SIGINT', sigintHandler)
1048
1049 // Dump run()'s state at SIGTERM so a stuck session's healthsweep can name

Callers

nothing calls this directly

Calls 2

logForDiagnosticsNoPIIFunction · 0.85
gracefulShutdownFunction · 0.85

Tested by

no test coverage detected