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

Allow reload plugin to continue restarting master after syntax errors are fixed. #137

Open jdeal opened 13 years ago

jdeal commented 13 years ago

The reload plugin gets stuck if there's a syntax error. The master can't re-spawn since there's a syntax error, and the reload plugin won't try again, because the restarting flag gets set to true. This fork watches for the master process to exit and then emits an 'exit' event for the master. This way, the reload plugin can watch for the 'exit' event and reset its restarting flag.