Subversion Repositories Mokou

Rev

Rev 5 | Rev 8 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 6
Line 1... Line 1...
1
/* $Id: service.c 5 2024-09-07 08:42:09Z nishi $ */
1
/* $Id: service.c 6 2024-09-07 08:57:23Z nishi $ */
2
 
2
 
3
#include "mk_service.h"
3
#include "mk_service.h"
4
 
4
 
5
#include <fcntl.h>
5
#include <fcntl.h>
6
#include <stdio.h>
6
#include <stdio.h>
Line 15... Line 15...
15
#include "mk_log.h"
15
#include "mk_log.h"
16
#include "mk_util.h"
16
#include "mk_util.h"
17
 
17
 
18
struct mk_service** services = NULL;
18
struct mk_service** services = NULL;
19
 
19
 
-
 
20
#ifdef __linux__
-
 
21
const char* sys_signame[] = {
-
 
22
	"HUP",
-
 
23
	"INT",
-
 
24
	"QUIT",
-
 
25
	"ILL",
-
 
26
	"TRAP",
-
 
27
	"ABRT",
-
 
28
	"BUS",
-
 
29
	"FPE",
-
 
30
	"KILL",
-
 
31
	"USR1",
-
 
32
	"SEGV",
-
 
33
	"USR2",
-
 
34
	"PIPE",
-
 
35
	"ALRM",
-
 
36
	"TERM",
-
 
37
	"STKFLT",
-
 
38
	"CHLD",
-
 
39
	"CONT",
-
 
40
	"STOP",
-
 
41
	"TSTP",
-
 
42
	"TTIN",
-
 
43
	"TTOU",
-
 
44
	"URG",
-
 
45
	"XCPU",
-
 
46
	"XFSZ",
-
 
47
	"VTALRM",
-
 
48
	"PROF",
-
 
49
	"WINCH",
-
 
50
	"POLL",
-
 
51
	"PWR",
-
 
52
	"SYS",
-
 
53
	"RTMIN"
-
 
54
};
-
 
55
#endif
-
 
56
 
20
void mk_service_scan(void){
57
void mk_service_scan(void){
21
	if(services != NULL){
58
	if(services != NULL){
22
		int i;
59
		int i;
23
		for(i = 0; services[i] != NULL; i++){
60
		for(i = 0; services[i] != NULL; i++){
24
			if(services[i]->name != NULL) free(services[i]->name);
61
			if(services[i]->name != NULL) free(services[i]->name);