#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) |
|
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. |
|
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.
|