forked from artyom-beilis/cppcms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdaemonize.h
More file actions
35 lines (28 loc) · 900 Bytes
/
Copy pathdaemonize.h
File metadata and controls
35 lines (28 loc) · 900 Bytes
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
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
//
// See accompanying file COPYING.TXT file for licensing details.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef CPPCMS_IMPL_DAEMONIZE_H
#define CPPCMS_IMPL_DAEMONIZE_H
#include <cppcms/defs.h>
#include <string>
namespace cppcms {
namespace json { class value; }
namespace impl {
class CPPCMS_API daemonizer {
public:
daemonizer(json::value const &conf);
~daemonizer();
static int global_urandom_fd;
private:
int real_pid;
std::string unlink_file;
void daemonize(json::value const &conf);
void cleanup();
};
}
}
#endif