-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcess.h
More file actions
30 lines (28 loc) · 791 Bytes
/
Copy pathProcess.h
File metadata and controls
30 lines (28 loc) · 791 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
#ifndef PROCESS_H
#define PROCESS_H
#include <string>
#include <iostream>
#include <cstdio>
#include <vector>
#include "ConstDef.h"
using namespace std;
class Process{
private:
Process();
~Process();
//if _zk disconnect with server. _stop will be true and main loop will be reiterate
static bool stop;
static void handleCmd(vector<string>& cmd);
public:
static bool isProcessRunning(const string& processName);
static int daemonize();
static int processKeepalive(int& childExitStatus, const string pidFile);
static void sigForward(const int sig);
static void sigHandler(const int sig);
static int processFileMsg(const string cmdFile);
static void processParam(const string& op);
static bool isStop();
static void setStop();
static void clearStop();
};
#endif