Browse Source

* add SIGUSR1 handler : logrotate

master
Alex 'AdUser' Z 8 years ago
parent
commit
88494f2238
  1. 3
      src/daemon.c

3
src/daemon.c

@ -44,6 +44,9 @@ enum { stop = 0, run, reconfig, logrotate, test } state = run;
void signal_handler(int signum) { void signal_handler(int signum) {
switch (signum) { switch (signum) {
case SIGUSR1:
state = logrotate;
break;
case SIGTERM: case SIGTERM:
case SIGINT: case SIGINT:
f2b_log_msg(log_info, "got SIGTERM/SIGINT, exiting"); f2b_log_msg(log_info, "got SIGTERM/SIGINT, exiting");

Loading…
Cancel
Save