MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / onSignal

Function onSignal

bin/mcp-server.js:152–156  ·  view source on GitHub ↗
(signal)

Source from the content-addressed store, hash-verified

150let shutdownStarted = false
151function installShutdownHooks() {
152 const onSignal = (signal) => {
153 if (shutdownStarted) return
154 shutdownStarted = true
155 teardownContainer().finally(() => process.exit(signal === 'SIGINT' ? 130 : 0))
156 }
157 process.on('SIGTERM', () => onSignal('SIGTERM'))
158 process.on('SIGINT', () => onSignal('SIGINT'))
159 process.on('beforeExit', () => {

Callers 1

installShutdownHooksFunction · 0.85

Calls 1

teardownContainerFunction · 0.85

Tested by

no test coverage detected