-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathverify_uk_monitor_process.h
42 lines (34 loc) · 1.41 KB
/
verify_uk_monitor_process.h
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
/* *************************************************
* File name:
* monitor_process.h
* Description:
* To avoid the process being blocked, there is a monitor process
* to kill those ones whose life time is too long.
* Author:
* Yan Zhiwei, [email protected] (Drum Team)
* Date:
* 2012-12-13
* *************************************************/
#ifndef MONITOR_PROCESS_H
#define MONITOR_PROCESS_H
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "shmsem.h"
#include "verify_uk_common.h"
#include "check.h"
int Insert_pid_process_table(pid_t pid,int deadline,enum ProcessType type, char* ip_str);
int Remove_pid_process_table(pid_t pid);
int Register_process_into_process_table(struct ChildProcessStatus *ptr, int prcs_num,pid_t pid,int deadline,enum ProcessType type, char* ip_str);
int Unregister_process_from_process_table(struct ChildProcessStatus *ptr, int prcs_num,pid_t pid);
int Increase_process_life_time(struct ChildProcessStatus *ptr, int prcs_num);
int Kill_invalid_process(struct ChildProcessStatus *ptr, int prcs_num);
int Set_process_life_time(pid_t pid, int life_time);
int Increase_half_lifetime_record_process(struct ChildProcessStatus *ptr, int prcs_num);
void Print_current_date_time(void);
int Count_available_process_slot(void);
int Stop_recv_timer(pid_t pid);
#endif