[dovecot-cvs] dovecot/src/master log.c,1.9,1.10
tss at dovecot.org
tss at dovecot.org
Wed Oct 11 13:22:35 UTC 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv12652
Modified Files:
log.c
Log Message:
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.
Index: log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/log.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- log.c 8 Oct 2006 22:41:53 -0000 1.9
+++ log.c 11 Oct 2006 12:22:31 -0000 1.10
@@ -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;
}
More information about the dovecot-cvs
mailing list