blob: 90b12d9604a4636b151ec85825581c638d43bad6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#ifndef __PROCESS_H
#define __PROCESS_H
#include <string>
#include <map>
using namespace std;
class configuration;
typedef map<string,string> headers_t;
class process {
public:
string pidfile;
string process_name;
string restart_cmd;
string notify;
string user;
string group;
string chroot;
headers_t mailto_headers;
int patience;
process()
: patience(0) { }
void check(const string& id,configuration& config);
void launch(const string& id,configuration& config);
void do_notify(const string& id,const string& event,const string& description,configuration& config);
void notify_mailto(const string& email,const string& id,const string& event,
const string& description,configuration& config);
void signal(int signum) const;
void check() const;
static void prepare_herd();
static void gather_proc_info();
static void unprepare_herd();
};
typedef map<string,process> processes_t;
#endif /* __PROCESS_H */
|