Exemple #1
0
void signal_handler(int sig) {
	switch (sig) {
	case SIGHUP:
		dmn.reup();
		break;
	case SIGTERM:
		dmn.die();
		break;
	}
}
Exemple #2
0
void signal_handler(int sig) {
	switch (sig) {
	case SIGHUP:
		syslog(LOG_INFO, "Reload conf file\n");
		break;
	case SIGTERM:
		syslog(LOG_INFO, "Close daemon...\n");
		dmn.die();
		break;
	}
}