Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

dsDaemon.C File Reference

#include <dsDaemon.h>


#define PID_PATH   "/var/run"
#define CHILD_TIMEOUT   10


SigfuncSignal (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)

Define Documentation

#define CHILD_TIMEOUT   10

#define PID_PATH   "/var/run"

Function Documentation

void daemonize dsDaemon   sd,
int    options = 0

Perform basic system tasks to become a daemon: close all handlers, allocate new process group and detach

  • sd pointer to dsDaemon object
  • options daemon flags

void dsSafeSleep int    secs,
int    nsecs = 0

safe sleep: implement sleep by nanosleep or select timer (TODO), instead of using SIGALARM or sleep() to avoid possible interference with user application

void SIGANY_hdl int    sig

void SIGCHLD_hdl int    sig

void SIGINT_hdl int    sig

Sigfunc* Signal int    signo,
Sigfunc   func

Generated on Mon May 16 18:26:58 2005 for libdms4 by doxygen1.3-rc2