MCPcopy
hub / github.com/zts212653/clowder-ai / ShutdownProcess

Interface ShutdownProcess

packages/mcp-server/src/refresh-loop.ts:131–134  ·  view source on GitHub ↗

* Cloud Codex P1 (PR #1368, e4da094a59): registering custom SIGINT/SIGTERM * handlers without calling process.exit() suppresses Node's default termination * behavior, leaving the MCP process unable to shut down on signals. * * Cloud Codex P2 (PR #1368, 7de77a70d): exit(0) hides termination cause

Source from the content-addressed store, hash-verified

129 * Process is dependency-injected for tests.
130 */
131interface ShutdownProcess {
132 on: (signal: 'SIGTERM' | 'SIGINT', handler: () => void) => unknown;
133 exit: (code: number) => void;
134}
135
136const SIGNAL_NUMBERS: Record<'SIGTERM' | 'SIGINT', number> = { SIGTERM: 15, SIGINT: 2 };
137

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected