daemon_controller: Automatic Daemon Process Management
After tackling the difficult task of improving Rails deployment, Phusion - the creators of Passenger (mod_rails) recently announced the availability of daemon_controller - a library (rather than a stand-alone tool) for managing daemons. It lets you write applications that manage daemons in a robust manner (e.g. mongrel_cluster or UltraSphinx could be adapted to use this library).
The primary motivation for using daemon_controller is to make it easier to have other applications (such as Rails apps) start daemons without encountering race conditions or parallel attempts. With a little work, daemon_controller makes it possible for your app to safely launch all the daemons that its functionality relies upon (UltraSphinx, BackgrounDRb, etc.).
The library is simple to use - though it does require that you know how to start the daemon, how to contact the daemon, and you must know where it will put its PID and log files. Source code is available at http://github.com/FooBarWidget/daemon_controller/tree/master