redding/qs — pull request #12 by jcredding (2013-08-28 15:45:38+00:00)
Title: Update `Daemon` state and `Process` signal handling

This updates and formalizes the `Daemon`'s state handling and the
`Process` signal handling. This moves the signal handling logic
more fully into the `Process` and has it drive the `Daemon`'s
state as needed. A `Daemon` now provies a proc callback that's
part of the work loop. The callback is intended as a chance to
check for signals. This moves signal handling fully into the
`Process` and allowed simplifying the `Daemon`'s interface. A
`Daemon` no longer is aware of a "restart" state. This was a
state that was no different (and never would be different) from the
stop state. It served only as a trigger for the `Process` to run
an `exec` command. Since the `Process` is the only one that cared
about it, it shouldn't be in the `Daemon`.

This sets up using `DatWorkerPool` in a `Daemon` and having a
proper work loop that checks for work and adds it to the pool as
its available.