dovecot-2.0: master: SIGUSR1 now reopens logs.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 8 21:34:26 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/45e87a15cf48
changeset: 9902:45e87a15cf48
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 08 14:33:42 2009 -0400
description:
master: SIGUSR1 now reopens logs.
diffstat:
2 files changed, 4 insertions(+), 8 deletions(-)
src/log/main.c | 9 +--------
src/master/main.c | 3 +++
diffs (38 lines):
diff -r 987d244a7a3e -r 45e87a15cf48 src/log/main.c
--- 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;
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();
diff -r 987d244a7a3e -r 45e87a15cf48 src/master/main.c
--- 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_
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
More information about the dovecot-cvs
mailing list