pm2/examples/exit.js
Alexandre Strzelewicz 025033c77d fix ESRCH
2013-10-18 10:53:30 +02:00

29 lines
531 B
JavaScript

// process.on('exit', function() {
// console.log('About to exit.');
// });
// process.on('uncaughtException', function(err) {
// console.log('Caught exception: ' + err);
// });
// process.on('SIGINT', function() {
// console.log('Got SIGINT. Press Control-D to exit.');
// process.exit(1);
// });
var worker = require('cluster').worker;
worker.on('disconnect', function() {
console.log('exiting');
});
setInterval(function() {
}, 1);
setInterval(function() {
console.log('ok');
}, 2000);
console.log('ok');