Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4650:4ff5080c5325 HEAD
When shutting down do one last read from log fds to see if there's something
waiting. Also set log fd to be non-blocking.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 11 Oct 2006 15:22:31 +0300 |
parents | a3d6a3462745 |
children | 2fe8f6a0bc5b |
files | src/master/log.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/log.c Wed Oct 11 15:17:27 2006 +0300 +++ b/src/master/log.c Wed Oct 11 15:22:31 2006 +0300 @@ -3,6 +3,7 @@ #include "common.h" #include "ioloop.h" #include "istream.h" +#include "fd-set-nonblock.h" #include "fd-close-on-exec.h" #include "log.h" @@ -167,6 +168,7 @@ return -1; } + fd_set_nonblock(fd[0], TRUE); fd_close_on_exec(fd[0], TRUE); fd_close_on_exec(fd[1], TRUE); @@ -280,6 +282,9 @@ while (log_ios != NULL) { next = log_ios->next; + /* do one final log read in case there's still something + waiting */ + log_read(log_ios); log_unref(log_ios); log_ios = next; }