Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

daemon.c File Reference

#include <stdio.h>
#include <dirent.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <error.h>
#include <signal.h>
#include <getopt.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <glib.h>
#include <string.h>
#include <errno.h>

Functions

void sig_child ()
int start_daemon (int a_ignoreSIGCLD)

Function Documentation

void sig_child  
 

This is a signal handler that will wait for child processes to terminate and thus avoiding zombies. This function was adapted from the Richard Stevens book on Unix Network Programming.

It should be noted that the calling process may get an interrupted system call upon return from this function and it should be handled appropriatly.

int start_daemon int    a_ignoreSIGCLD
 

This function is called when the App. Heartbeat Monitor should execute as a daemon. This code was adapted from the Richard Stevens book on Unix Network Programming.

Returns:
zero on success; non-zero on error


Generated on Wed Oct 30 15:21:17 2002 for Application Heartbeat Monitor by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002