summaryrefslogtreecommitdiff
path: root/src/daemon.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon.h')
-rw-r--r--src/daemon.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/daemon.h b/src/daemon.h
index 1ba88d4..7d8ddf8 100644
--- a/src/daemon.h
+++ b/src/daemon.h
@@ -3,7 +3,7 @@
* daemon.h
*
* Thu Jun 9 10:27:59 CEST 2005
- * Copyright 2005 Bent Bisballe
+ * Copyright 2005 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
@@ -27,6 +27,8 @@
#include <sys/types.h>
+#include <string>
+
class Daemon {
public:
Daemon();
@@ -35,10 +37,12 @@ public:
/**
* Use NOBODY_GROUP and NOBODY_USER if no privileges are needed to run.
*/
- int run(const char* user, const char* group, bool foreground);
+ int run(const char* user, const char* group, bool detach = true,
+ std::string pidfile = "");
private:
virtual int daemon_main() = 0;
+
};
#endif/*__DAEMON_H__*/