Does anyone know how to deal with this kind of thing?
I have process A that forks 3 processes, but when an exception occurs in 
process A and it's not caught, it never dies and stays like a zombie 
waiting for something...
Somehow the forked processes are preventing the parent process from exiting.

After trying different approaches, I found this "hack" and seems to work:

process.on('uncaughtException', function(e) {
logger.logError(e);
console.trace();
process.exit(1);
});
process.on('exit', function() {
// kill each forked process using .kill()
});

Is there a cleaner way to do this? what about SIGTERM, SIGKILL, etc events?

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to