MCPcopy Create free account
hub / github.com/tiann/hapi / registerProcessHandlers

Function registerProcessHandlers

cli/src/agent/runnerLifecycle.ts:107–125  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105 }
106
107 const registerProcessHandlers = () => {
108 process.on('SIGTERM', () => {
109 void cleanupAndExit()
110 })
111
112 process.on('SIGINT', () => {
113 void cleanupAndExit()
114 })
115
116 process.on('uncaughtException', (error) => {
117 markCrash(error)
118 void cleanupAndExit(1)
119 })
120
121 process.on('unhandledRejection', (reason) => {
122 markCrash(reason)
123 void cleanupAndExit(1)
124 })
125 }
126
127 return {
128 setExitCode,

Callers

nothing calls this directly

Calls 3

cleanupAndExitFunction · 0.85
markCrashFunction · 0.85
onMethod · 0.45

Tested by

no test coverage detected