summaryrefslogtreecommitdiffabout
path: root/src/util.h
Side-by-side diff
Diffstat (limited to 'src/util.h') (more/less context) (ignore whitespace changes)
-rw-r--r--src/util.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 0000000..314d8e2
--- a/dev/null
+++ b/src/util.h
@@ -0,0 +1,20 @@
+#ifndef __UTIL_H
+#define __UTIL_H
+
+#include <string>
+using namespace std;
+
+class pid_file {
+ public:
+ string file_name;
+ bool unlink_pid;
+
+ pid_file()
+ : unlink_pid(false) { }
+ ~pid_file() { unlink(); }
+
+ void set(const string& f,bool u=true);
+ void unlink();
+};
+
+#endif /* __UTIL_H */