summaryrefslogtreecommitdiffabout
path: root/src/util.h
blob: 314d8e20f51c44257b40347dfc3b06eb75495007 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 */