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

Fixing race condition between mkdir and event listener registration in pidfiles and logger plugins. #169

Open koudelka opened 12 years ago

koudelka commented 12 years ago

Previously, if workers came online before mkdir callbacks fired, their corresponding worker-started callbacks would never run. (no pidfiles or no log files).

I've made the mkdir call synchronous, which shouldn't be a problem as it's called during startup.

alexkwolfe commented 12 years ago

I'm seeing this also. The net effect is that the pid files either don't exist or the pids are wrong. Either way, this bug breaks the cli functionality.

jeffv commented 12 years ago

I wouldn't be surprised if it were becoming defunct given the latest API. http://nodejs.org/docs/latest/api/cluster.html