summaryrefslogtreecommitdiff
path: root/server/src/daemon.h
diff options
context:
space:
mode:
authordeva <deva>2010-07-05 09:49:42 +0000
committerdeva <deva>2010-07-05 09:49:42 +0000
commitdc6abe86d2730b16cb155a02b3ec9d79fcaa72f7 (patch)
tree0fa222007bd1827da42e01dedbafaa005faedf31 /server/src/daemon.h
parent04168eca33079dd27c60c894a54d76d4bc627c55 (diff)
Make server write its pid file. Daemon class ported from pentominos.
Diffstat (limited to 'server/src/daemon.h')
-rw-r--r--server/src/daemon.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/server/src/daemon.h b/server/src/daemon.h
index 89c3f1c..ef6eecc 100644
--- a/server/src/daemon.h
+++ b/server/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
****************************************************************************/
@@ -28,6 +28,8 @@
#include <sys/types.h>
+#include <string>
+
class Daemon {
public:
Daemon();
@@ -36,10 +38,12 @@ public:
/**
* Use NOBODY_GROUP and NOBODY_USER if no privileges are needed to run.
*/
- int run(const char* user, const char* group, bool detach = true);
+ int run(const char* user, const char* group, bool detach = true,
+ std::string pidfile = "");
private:
virtual int daemon_main() = 0;
+
};
#endif/*__DAEMON_H__*/