changeset 9902:45e87a15cf48 HEAD

master: SIGUSR1 now reopens logs.
author Timo Sirainen <tss@iki.fi>
date Tue, 08 Sep 2009 14:33:42 -0400
parents 987d244a7a3e
children 329b1f01052a
files src/log/main.c src/master/main.c
diffstat 2 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/log/main.c	Tue Sep 08 14:32:53 2009 -0400
+++ b/src/log/main.c	Tue Sep 08 14:33:42 2009 -0400
@@ -13,20 +13,13 @@
 pid_t master_pid;
 
 static void
-sig_reread_config(const siginfo_t *si ATTR_UNUSED, void *context ATTR_UNUSED)
-{
-	// FIXME
-}
-
-static void
 sig_reopen_logs(const siginfo_t *si ATTR_UNUSED, void *context ATTR_UNUSED)
 {
-	// FIXME
+	master_service_init_log(master_service, "log: ", 0);
 }
 
 static void main_init(void)
 {
-        lib_signals_set_handler(SIGHUP, TRUE, sig_reread_config, NULL);
 	lib_signals_set_handler(SIGUSR1, TRUE, sig_reopen_logs, NULL);
 
 	master_pid = getppid();
--- a/src/master/main.c	Tue Sep 08 14:32:53 2009 -0400
+++ b/src/master/main.c	Tue Sep 08 14:33:42 2009 -0400
@@ -375,6 +375,9 @@
 sig_log_reopen(const siginfo_t *si ATTR_UNUSED, void *context ATTR_UNUSED)
 {
         service_signal(services->log, SIGUSR1);
+
+	master_service_init_log(master_service, "dovecot: ", 0);
+	i_set_fatal_handler(master_fatal_callback);
 }
 
 static void