/* * called upon receipt of signals */ static void signal_handler(int sig) { #ifdef SVR3SIGNALS /* * Some systems reset handler to SIG_DFL upon entry to handler. * In that case, we reregister our handler. */ (void) signal(sig, signal_handler); #endif switch(sig) { case SIGHUP : hupped = 1; return; case SIGINT : exit(0); /*NOTREACHED*/ case SIGTERM : done = 1; return; case SIGUSR1 : log_refresh(); return; case SIGUSR2 : log_roll_level(); return; case SIGALRM : return; } }
static void signal_handler(int sig) { #ifdef SVR3SIGNALS /* * Some systems reset handler to SIG_DFL upon entry to handler. * In that case, we reregister our handler. */ (void) signal(sig, signal_handler); #endif switch(sig) { case SIGINT : exit(0); case SIGTERM : done = !0; sleep(0); /* redundant on many systems, needed on others */ return; case SIGUSR1 : log_refresh(); stats_req = !0; return; case SIGUSR2 : log_roll_level(); return; } }
/* * called upon receipt of signals */ static void signal_handler(int sig) { #ifdef SVR3SIGNALS /* * Some systems reset handler to SIG_DFL upon entry to handler. * In that case, we reregister our handler. */ (void) signal(sig, signal_handler); #endif switch(sig) { case SIGINT : intr = !0; exit(0); case SIGTERM : done = !0; return; case SIGPIPE : #if NET if(INPUT_IS_SOCKET) { port_error = !0; } #endif return; case SIGUSR1 : log_refresh(); stats_req = !0; return; case SIGUSR2 : log_roll_level(); return; } }
static void signal_handler(int sig) { switch(sig) { case SIGINT : exit(1); case SIGTERM : done = 1; return; case SIGUSR1 : log_refresh(); return; } }
/* * Called upon receipt of signals. * This callback routine registered in set_sigactions() . */ static void signal_handler(int sig) { switch(sig) { case SIGINT : /*FALLTHROUGH*/ case SIGTERM : done = !0; return; case SIGUSR1 : log_refresh(); return; case SIGUSR2 : log_roll_level(); return; case SIGPIPE : return; } }
/* * called upon receipt of signals */ static void signal_handler(int sig) { switch(sig) { case SIGHUP : hupped = 1; return; case SIGINT : exit(0); /*NOTREACHED*/ case SIGTERM : done = 1; return; case SIGUSR1 : log_refresh(); return; case SIGUSR2 : log_roll_level(); return; case SIGALRM : return; } }