#include <dsDaemon.h>
Defines | |
#define | PID_PATH "/var/run" |
#define | CHILD_TIMEOUT 10 |
Functions | |
Sigfunc * | Signal (int signo, Sigfunc *func) |
void | daemonize (dsDaemon *sd, int options) |
void | dsSafeSleep (int secs, int nsecs) |
void | SIGCHLD_hdl (int sig) |
void | SIGANY_hdl (int sig) |
void | SIGINT_hdl (int sig) |
|
|
|
|
|
Perform basic system tasks to become a daemon: close all handlers, allocate new process group and detach
|
|
safe sleep: implement sleep by nanosleep or select timer (TODO), instead of using SIGALARM or sleep() to avoid possible interference with user application |
|
|
|
|
|
|
|
|