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

Crash on start without 'pids' or 'logs' folders #79

Closed marcello3d closed 13 years ago

marcello3d commented 13 years ago

When using cluster.use(cluster.pidfiles('pids')) without a pids folder, cluster crashes on start:

<...>/node_modules/cluster/lib/plugins/pidfiles.js:42
    function fn(err){ if (err) throw err; }
                               ^
Error: ENOENT, No such file or directory '<...>/pids/worker.0.pid'

The same occurs with the logs plugin. If you're requiring the user to make that folder themselves, it'd be nice to have a more explicit error message. Or just make the folder.

tj commented 13 years ago

yeah we could make the dirs, just sucks that node does not have a mkdir -p equiv, exec() feels dirty for this stuff but it would beat some 50 line thing in node

tj commented 13 years ago

we have mkdir-p stuff now