LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

workers do not get killed if master is killed #174

Closed jesseditson closed 12 years ago

jesseditson commented 12 years ago

if you kill a cluster master process, the workers won't get killed like the do with SIGINT.

For now, I created a plugin for this: https://github.com/jesseditson/cluster-danzig - but it might be nice to have this as a default.

tj commented 12 years ago

you can't trap SIGKILL, they're also not zombies they're just orphaned haha, but a reasonable way to deal with this is to send a nul signal to the ppid, if master is dead then the child kills itself (love programming terms haha)

jesseditson commented 12 years ago

Right - updated the readme to make more sense - FWIW, SIGTERM will only kill the master, which is the issue I'm tackling here. Still working on a workaround for SIGKILL. Thanks!