An xmlrpc test project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
598 B

#include <signal.h> /* for signal() and signal names */
#include "../include/monitor.h"
volatile int doShutdown;
void terminate(int signum)
{
signal(signum, SIG_IGN);
syslogMonitor(LOG_INFO, MON_INFO, "signals",
"caugth deadly signal %d, service terminated", signum);
doShutdown = 1;
}
void init_signals(void)
{
signal(SIGTERM, terminate);
signal(SIGHUP, SIG_IGN);
signal(SIGINT, terminate);
signal(SIGQUIT, terminate);
signal(SIGABRT, terminate);
signal(SIGALRM, SIG_IGN);
signal(SIGURG, SIG_IGN);
signal(SIGPIPE, SIG_IGN);
}