(signal)
| 204 | // parent process is killed. |
| 205 | // this is fairly safe since user code cannot run in this process |
| 206 | function signalHandler(signal) { |
| 207 | return async () => { |
| 208 | watcher.clear(); |
| 209 | const exitCode = await killAndWait(signal, true); |
| 210 | process.exit(exitCode ?? kNoFailure); |
| 211 | }; |
| 212 | } |
| 213 | |
| 214 | process.on('SIGTERM', signalHandler('SIGTERM')); |
| 215 | process.on('SIGINT', signalHandler('SIGINT')); |
no test coverage detected