I'm following the guidance here (listening for SIGINT events) to gracefully shutdown my Windows-8-hosted node.js application in response to Ctrl+C or server shutdown.
But Windows doesn't have SIGINT. I also tried process.on('exit'), but that seems to late to do anything productive.
On Windows, this code gives me: Error: No such module
process.on( 'SIGINT', function() {
console.log( "\ngracefully shutting down from SIGINT (Crtl-C)" )
// wish this worked on Windows
process.exit( )
})
On Windows, this code runs, but is too late to do anything graceful:
process.on( 'exit', function() {
console.log( "never see this log message" )
})
Is there a SIGINT equivalent event on Windows?
