You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Ctrl+C is used in terminal, CLI receives SIGINT signal and tries to clear its resources. In Node.js, when you handle SIGINT signal, you'll have to clean all resources on your own. This leads to different problems, for example in case you press Ctrl+C during doctor execution, CLI will only kill the doctor process, but will continue working.
Instead of handling the SIGINT signal, let the OS handle it on its own. This works quite well except one thing - any package that is required may add handler for SIGINT signal and this will break the idea. So repace the `process.on` function with our own one which does not allow adding handler for SIGINT signal.
logger.trace(newError(`Trying to handle SIGINT event. CLI overrides this behavior and does not allow handling SIGINT as this causes issues with Ctrl + C in terminal`).stack);
0 commit comments