dovecot-2.1: inotify: If read() fails with EAGAIN, ignore it ins...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 20 13:35:13 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/803979bc30ab
changeset: 13518:803979bc30ab
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 20 13:30:08 2011 +0300
description:
inotify: If read() fails with EAGAIN, ignore it instead of dying.

diffstat:

 src/lib/ioloop-notify-inotify.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 25f9856be51e -r 803979bc30ab src/lib/ioloop-notify-inotify.c
--- a/src/lib/ioloop-notify-inotify.c	Tue Sep 20 11:53:02 2011 +0300
+++ b/src/lib/ioloop-notify-inotify.c	Tue Sep 20 13:30:08 2011 +0300
@@ -45,7 +45,7 @@
 	   only full events are returned by the kernel. */
 	ret = read(ctx->inotify_fd, event_buf, sizeof(event_buf));
 	if (ret <= 0) {
-		if (ret == 0) {
+		if (ret == 0 || errno == EAGAIN) {
 			/* nothing more to read */
 			return FALSE;
 		}


More information about the dovecot-cvs mailing list