RedVentures/workforce — pull request #5 by mkzero (2012-09-12 22:29:26+00:00)
Title: Better SIGHUP restart

After playing a bit around with the signal handlers I found out that the SIGHUP signal completely killed the server. I fixed it so a sent SIGHUP kills all workers and starts them again.

There were some problem with not existing functions like this.quit.

Also in quitWorker the destroyWorker function was neither accessible via this nor via self, so I (temporarily) fixed this dirty via hardcoding the destroyWorker functionality into the quitWorker function - this should definitely be fixed to use the existing function again.

The count of the killed workers were not restarted originally - only one worker was restarted. A loop now creates the given number of workers that was supplied when starting the server.