I tried searching the Node.js source code, but I could not find it. By default, where would I find the Node.js code that handles SIGINT (Ctrl+C) by default in the following example:
var http = require('http');
var server = http.createServer(function(req, res) {
res.writeHead(200);
res.end('Hello Http');
});
server.listen(5001);
Node’s default SIGINT handler is in node.cc, but it doesn’t do much. It calls signalExit, which does
You can add your own handler in node.js with