()
| 335 | if (!global.__SMALLCODE_SHELL_EXIT_REGISTERED__) { |
| 336 | global.__SMALLCODE_SHELL_EXIT_REGISTERED__ = true; |
| 337 | const cleanup = () => { if (_instance) try { _instance.stop(); } catch {} }; |
| 338 | process.on('exit', cleanup); |
| 339 | process.on('SIGINT', cleanup); |
| 340 | process.on('SIGTERM', cleanup); |