Several fixes for issues under high load
Hi, I've created a load test ./examples/bench.js to illustrate instability issues under high load. I've fixed the problems that I found in my fork and I've merged some more issues, which were reported and have been fixed elsewhere.
In particular, my fork resolves: * Fix for crash "SyntaxError: Unexpected token ILLEGAL"; Reason: stdout of child process may send data in multiple chunks. * It can happen that Jefe stops dispatching jobs even though queue is not empty. Fix: add a dispatcher that checks every 200ms for pending work. * The first process started never gets any job (there are 4 procs in the pool but only 3 child handlers!). Pull fix from pibi/master. This works. * Fix issue 7: Parent process killed when only child process should be terminated. https://github.com/fictorial/jefe/issues#issue/7 (thanks lgreenspan) * Fix obsolete calls to sys.p()
For more detail pls see my changes log.