frodwith/node-init — pull request #3 by johanoverip (2012-08-30 15:53:50+00:00)
Title: Synchronous alternatives

I've added synchronous calls to this module (for running only) as the `daemon` module does not support forking unless it is done during the first tick of v8. And the only way to ensure this is happening is synchronous calls.

Sample init.d script for a forking process:

```javascript
if (require('cluster').isMaster) {
require('init').simple({
pidfile : '/var/run/sample.pid',
logfile : '/var/log/sample.log',
runSync : function() {
// ... master code here
}
});
} else {
// ... worker code here
}
```