mydaemon.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <syslog.h>
#include <errno.h>
#include <pwd.h>
#include <signal.h>
#include <time.h>

Defines

#define DAEMON_NAME   "ray_traced"
#define RUN_AS_USER   "root"
#define EXIT_SUCCESS   0
#define EXIT_FAILURE   1

Functions

static void child_handler (int signum)
static void daemonize (const char *lockfile)

Define Documentation

#define DAEMON_NAME   "ray_traced"

#define EXIT_FAILURE   1

Referenced by child_handler(), and daemonize().

#define EXIT_SUCCESS   0

Referenced by child_handler().

#define RUN_AS_USER   "root"

Referenced by daemonize().


Function Documentation

static void child_handler ( int  signum  )  [static]

References EXIT_FAILURE, and EXIT_SUCCESS.

Referenced by daemonize().

static void daemonize ( const char *  lockfile  )  [static]


Generated on Sat Feb 6 12:43:19 2010 by  doxygen 1.5.7.1