Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2881:bd3f5358de8b HEAD
Make SIGUSR1 reopen log files.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 12 Nov 2004 16:35:49 +0200 |
parents | f2718224c9e9 |
children | dda3fe468ea3 |
files | src/master/main.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/main.c Fri Nov 12 16:35:39 2004 +0200 +++ b/src/master/main.c Fri Nov 12 16:35:49 2004 +0200 @@ -34,6 +34,7 @@ static const char *configfile = SYSCONFDIR "/" PACKAGE ".conf"; static struct timeout *to; static unsigned int settings_reload_hup_count = 0; +static unsigned int log_reopen_usr1_count = 0; struct ioloop *ioloop; struct hash_table *pids; @@ -141,6 +142,10 @@ settings_reload_hup_count = lib_signal_hup_count; settings_reload(); } + if (lib_signal_usr1_count != log_reopen_usr1_count) { + log_reopen_usr1_count = lib_signal_usr1_count; + set_logfile(settings_root->defaults); + } while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { /* get the type and remove from hash */