Add the ability to daemonize #79

wants to merge 5 commits into


None yet
2 participants

Add the ability to run in the background with the -D or --daemon command line option.

This patch looks really ugly as diff tried matching up lines that didn't actually match. All that really happened is most of the code was indented to create the main() function.


josegonzalez commented Dec 23, 2012

I'm going to hold off on this for a bit, since i have some major changes to introduce regarding multiprocessing etc. that will definitely impact this.

Why don't you use something else to daemonize beaver? I would rather have something like init.d, supervisor, circus etc. handle the state of the beaver command than have custom code for daemonization...

Does this work on Python 2.6?


josegonzalez commented Dec 25, 2012

Might you be able to rebase this on top of the latest master branch? I'd like to get this out in the next beaver release if possible.

The red hat init.d functions don't have a way of backgrounding a service and expects a daemon to run in the background. There are workarounds, but having the daemon behave in an anticipated way is preferred.

It does work on 2.6 and yes, I'll rebase.


josegonzalez commented Dec 25, 2012

Hey @joejulian, I added the ability to daemonize as part of a general refactor. This should work the same way as your method, except I added a bit of extra code to handle stdout to a file - was missing since it wasn't otherwise specified as a handler.

Let me know if you have any problems with it by opening a separate issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment