// $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 <g0dil@berlios.de>
//
// This program is free software; you can redistribute it and/or modify
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 <i>Safe startup.</i> If the startup fails, the foreground process which launches the
daemon will terminate with an appropriate error exit code.
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. */
bool pidfileCreate();
int argc_;
- char const ** argv_;
+ char ** argv_;
bool daemonize_;
std::string stdoutLog_;
int stdout_;
int stderr_;
std::string pidfile_;
+ bool pidfileCreated_;
bool detached_;
};
\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); \