I follow the instructions here (listening for SIGINT events) to gracefully close my node.js application hosted on Windows 8 in response to Ctrl-C or shutting down the server.
But Windows does not have SIGINT . I also tried process.on('exit') , but this seems to be doing something productive lately.
On Windows, this code gives me: Error: no such module
process.on( 'SIGINT', function() { console.log( "\ngracefully shutting down from SIGINT (Crtl-C)" )
On Windows, this code runs, but it's too late to do something elegant :
process.on( 'exit', function() { console.log( "never see this log message" ) })
Is there an equivalent SIGINT event on Windows?
pappadog Apr 05 2018-12-12T00: 00Z
source share