* 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
| 129 | * Process is dependency-injected for tests. |
| 130 | */ |
| 131 | interface ShutdownProcess { |
| 132 | on: (signal: 'SIGTERM' | 'SIGINT', handler: () => void) => unknown; |
| 133 | exit: (code: number) => void; |
| 134 | } |
| 135 | |
| 136 | const SIGNAL_NUMBERS: Record<'SIGTERM' | 'SIGINT', number> = { SIGTERM: 15, SIGINT: 2 }; |
| 137 |
nothing calls this directly
no outgoing calls
no test coverage detected