Then, you can run the processes in the foreground with `foreman start` (eg. on your dev machine), or export the processes to config files for the init system of your choice (eg. on your server). Once the processes have config files in the init system, Foreman is out of the picture: your processes are run and managed by the init system.
Of course, this all works very well in a Rails app (hence my blog post), but that's only one of many uses. Hope that helps!
There appear to be a few kinks to be worked out; for example Foreman fails to kill off Redis (for me) as described in this closed bug report:
https://github.com/ddollar/foreman/issues/15
Not a huge deal though. I'm happy to be using it for development.
I have need for a tool that has the ability to kill not just one level of child processes, but the tree. I've built something similar to foreman recently and came up with a hacky way to do this tree kill.
Every now and then my tool runs ps and parses the output. It uses PID and PPID to build a hierarchy of processes that are descended from it. I have a signal handler in the foreman-like tool that does the SIGTERM then SIGKILL like you describe. It's ugly and not portable but it is working in my setting.
Since then I've heard about process groups and have been meaning to try that as an alternate mechanism.
Something foreman has that my python tool doesn't have and that I want is the ability to bounce processes within the tree.
I'd like to be able to throw away my code and replace it with something polished. Interested in any further thoughts you have.
Update: hey - you're the author! Thanks. Another feature I'd like is the ability to query the foreman process running in the background and have it tell me what stuff it's currently running. The approach I've used in my tool was to use python-twisted to host a command line, and then I'd telnet to that and poke it. But - as I say above - it's still missing key features.
I'd also like to try using it to generate server configs, but I still don't like what Monit makes you do in order to run a non-daemonized process. I'm not sure why it can't just daemonize the process for you.