Why Sigterm Event Handler Wasn't Called In My Code Example?
Windows 10 x64 Node v12.19.0 Why wasn't called my handler of SIGTERM event after first opening http://localhost:3000/ in a browser? Application is terminated without executiong my
Solution 1:
On Windows 10, process.on('SIGINT',cb)
works for me, to catch interrupts like CTRL+C in a shell, or stop button commands in an IDE.
It also works well in production on Linux, particularly for pm2 restart
and similar commands.
Post a Comment for "Why Sigterm Event Handler Wasn't Called In My Code Example?"