Beispiel #1
0
static void catch_sigint(int signal){
    logmsg(LOG_WARN, "Shutting down due to quit signal!");
    pthread_rwlock_wrlock(&sigint_server->players_lock);
    Server_shutdown(sigint_server);
    pthread_rwlock_unlock(&sigint_server->players_lock);
    exit(0);
    
}
Beispiel #2
0
void signal_handler(int sig)
{
	switch(sig) {
		case SIGHUP:
			Log_info("HUP signal received.");
			Log_reset();
			break;
		case SIGTERM:
			Log_info("TERM signal. Shutting down.");
			Server_shutdown();
			break;
	}
}