summaryrefslogtreecommitdiffabout
path: root/src/util.h
Unidiff
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 @@
1#ifndef __UTIL_H
2#define __UTIL_H
3
4#include <string>
5using namespace std;
6
7class pid_file {
8 public:
9 string file_name;
10 bool unlink_pid;
11
12 pid_file()
13 : unlink_pid(false) { }
14 ~pid_file() { unlink(); }
15
16 void set(const string& f,bool u=true);
17 void unlink();
18};
19
20#endif /* __UTIL_H */