-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathfunctionSRV.h
More file actions
32 lines (28 loc) · 793 Bytes
/
Copy pathfunctionSRV.h
File metadata and controls
32 lines (28 loc) · 793 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
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
/**
* @brief Create pid file in the /var/run (unix format).
* @param serviceName name of the damemon.
*/
void savePIDrun(char *serviceName);
/**
* @brief Create de log file in the /var/log (unix format).
* @param filename name of the log file.
* @param message String to save in the file.
*/
void log_message(char *filename ,char *message);
/**
* @brief Create daemon binary (unix format).
* @param serviceName name of the damemon.
*/
void daemonizeGuardian(char *serviceName);
/**
* @brief Create daemon binary (unix format).
*/
void daemonize(void);