X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FDaemonTools.hh;h=466e5920d35c7131b3a960abca865c9344d1b122;hb=17e24d84603667395e9ffa786a9cdbb722bf9c1f;hp=6ea30e9daaa602787188da3b4943431c993b12a1;hpb=49f2e00bdc4014b34361a0830e7ec365844ee67a;p=senf.git diff --git a/Utils/DaemonTools.hh b/Utils/DaemonTools.hh index 6ea30e9..466e592 100644 --- a/Utils/DaemonTools.hh +++ b/Utils/DaemonTools.hh @@ -22,18 +22,24 @@ /** \defgroup process Process Management - This collection of utilities provides help in managing daemon processes. + Future features: + + \li Daemon manager watching the real daemon. Auto-restart, when the daemon fails + + \li Provide access to the config console indirectly via the daemon manager. This allows to + connect to the daemon manager console even if the app is not running + + \li For this to be efficient, the daemon manager must be it's own executable (e.g. senf-launch) - \idea Add communication between parent and child process to daemonize() and add things like - init_done(), failure() etc which allow the daemon process to tell the frontend of successful - startup or failure. This probably means moving all the methods into a DaemonTools class (as - statics or via a singleton). This would also allow for automatic pid file creation and - removal (remove in global destructor). + \li auto-detect whether called from senf-launch or not - \idea Add a DaemonProcess baseclass with init() and main() abstract members which wraps the - startup process. DaeminProcess::run() would fork, call init(), create a pid file and then - call main(). Exceptions during init()'s execution would be passed to the parent - process. This is based on the above API. + \li when daemon is running, the console is transparently forwarded to the daemon. The daemon + however can still access the daemon manager as a subgroup + + \li No idea, whether this is sensible: Make the daemon manager completely self-contained (not + dependent on any external OS support) by providing our own log-file rotation support. + + This collection of utilities provides help in managing daemon processes. \idea A closeall()/closemost() function which is useful when starting child processes. We'll use getrlimit to now the biggest filehandle and close all of em. closemost() takes a number of @@ -81,4 +87,6 @@ namespace senf { // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: