In a command prompt window, I have a running process. While the process is still executing, I click the (red) \'X\' in the corner of the command prompt window. The command p
"SIGHUP"... tested on Windows 8.1 pro + Node.js 0.10.24 works fine..
process.on('SIGHUP', function(){ //Your code goes here. });