()
| 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, |
nothing calls this directly
no test coverage detected