[dovecot-cvs] dovecot/src/master log.c,1.7.2.2,1.7.2.3
tss at dovecot.org
tss at dovecot.org
Wed Oct 11 13:22:33 UTC 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv12656
Modified Files:
Tag: branch_1_0
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.7.2.2
retrieving revision 1.7.2.3
diff -u -d -r1.7.2.2 -r1.7.2.3
--- log.c 8 Oct 2006 22:41:52 -0000 1.7.2.2
+++ log.c 11 Oct 2006 12:22:30 -0000 1.7.2.3
@@ -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