From 88494f22380b951bb8abb9a78256502a7cc0ebaf Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Thu, 6 Oct 2016 11:01:18 +1000 Subject: [PATCH] * add SIGUSR1 handler : logrotate --- src/daemon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/daemon.c b/src/daemon.c index f683bfc..746fde2 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -44,6 +44,9 @@ enum { stop = 0, run, reconfig, logrotate, test } state = run; void signal_handler(int signum) { switch (signum) { + case SIGUSR1: + state = logrotate; + break; case SIGTERM: case SIGINT: f2b_log_msg(log_info, "got SIGTERM/SIGINT, exiting");