X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FDaemon%2FDaemon.hh;h=25b8e603fcab1aed7e0732097553c5c838bc4418;hb=c982fa43422749639c03870b4a6fd756b167ffcb;hp=cb14ca767ea178d5a132a8e44248192a4fc23606;hpb=705f99c7f8e408c12cb4ba65b6fd48c843d74737;p=senf.git diff --git a/Utils/Daemon/Daemon.hh b/Utils/Daemon/Daemon.hh index cb14ca7..25b8e60 100644 --- a/Utils/Daemon/Daemon.hh +++ b/Utils/Daemon/Daemon.hh @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer NETwork research (NET) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -34,9 +34,9 @@ namespace senf { - /** \brief Daemon process + /** \brief %Daemon process - senf::Daemon provides simple management for daemon processes. Specifically, the Daemon class + %senf::Daemon provides simple management for daemon processes. Specifically, the %Daemon class implements \li Safe startup. If the startup fails, the foreground process which launches the daemon will terminate with an appropriate error exit code. @@ -154,13 +154,13 @@ namespace senf { successful startup. */ int argc(); ///< Access command line parameter count - char const ** argv(); ///< Access command line parameters + char ** argv(); ///< Access command line parameters static void exit(unsigned code=0); ///< Terminate daemon with failure ///\} - int start(int argc, char const ** argv); ///< Called from main() to launch daemon. + int start(int argc, char ** argv); ///< Called from main() to launch daemon. /**< Normally not called directly but from the \ref SENF_DAEMON_MAIN macro. */ @@ -201,7 +201,7 @@ namespace senf { bool pidfileCreate(); int argc_; - char const ** argv_; + char ** argv_; bool daemonize_; std::string stdoutLog_; @@ -209,6 +209,7 @@ namespace senf { int stdout_; int stderr_; std::string pidfile_; + bool pidfileCreated_; bool detached_; }; @@ -221,7 +222,7 @@ namespace senf { \ingroup process */ # define SENF_DAEMON_MAIN(klass) \ - int main(int argc, char const ** argv) \ + int main(int argc, char ** argv) \ { \ klass instance; \ return instance.start(argc, argv); \