X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2FDaemon%2FDaemon.hh;h=747120f4aed02fb6881a1711ffccffe64ecb7992;hb=9cb871b939efe93e35dd96808d25089399acfc46;hp=38284d29815a6876e6828dd013efe2b3d703e55b;hpb=3a43b572a2c0028b353d47e86fa7546633d6e2cf;p=senf.git diff --git a/senf/Utils/Daemon/Daemon.hh b/senf/Utils/Daemon/Daemon.hh index 38284d2..747120f 100644 --- a/senf/Utils/Daemon/Daemon.hh +++ b/senf/Utils/Daemon/Daemon.hh @@ -52,7 +52,7 @@ namespace senf { \li Optional foreground execution. The daemon may be started in the foreground for debugging purposes. In this case, the console log file(s) is/are automatically suppressed. - + Starting the daemon process proceeds along the following steps: \li The daemon is started by calling the daemon class instances start() member. This normally happens from the \c main() function generated by \ref SENF_DAEMON_MAIN(). @@ -62,7 +62,7 @@ namespace senf { created. The parent (foreground) process keeps running overseeing the daemon process. \li main() is called. This virtual member may optionally be overridden in the derived class. Here we assume, main() is not overridden so the default implementation is used. - \li main() calls init(). + \li main() calls init(). \li after init() returns, main() calls detach(). \li detach() signals successful startup to the parent process. The parent process terminates leaving the daemon process running in the background. @@ -98,7 +98,7 @@ namespace senf { arguments. It just checks, if any of above arguments are present and precesses them. Other arguments are completely ignored. The command line parameters should be completely processed within init(). - + */ class Daemon : boost::noncopyable { @@ -107,13 +107,13 @@ namespace senf { /////////////////////////////////////////////////////////////////////////// // Types - + /// Select standard stream to redirect - enum StdStream { + enum StdStream { StdOut /** Standard output stream */ , StdErr /** Standard error stream */ , Both /** Both, standard output and error stream */ - }; + }; /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members @@ -128,12 +128,12 @@ namespace senf { void daemonize(bool); ///< Configure whether to run in fore- or background bool daemon(); ///< \c true, if running as daemon - void consoleLog(std::string const &, StdStream which = Both); + void consoleLog(std::string const &, StdStream which = Both); ///< Configure console log file /**< May be called multiple times to set the log file for stdout and stderr seperately. Any standard stream not assigned to a log file will be redirected to - /dev/null. + /dev/null. When running in the foreground, the log files will be ignored. */ @@ -166,7 +166,7 @@ namespace senf { SIGHUP calls logReopen. */ ///\} - + int start(int argc, char const ** argv); ///< Called from main() to launch daemon. /**< Normally not called directly but from the \ref SENF_DAEMON_MAIN macro. */