]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
inotify: If read() fails with EAGAIN, ignore it instead of dying.
authorTimo Sirainen <tss@iki.fi>
Tue, 20 Sep 2011 10:30:08 +0000 (13:30 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 Sep 2011 10:30:08 +0000 (13:30 +0300)
src/lib/ioloop-notify-inotify.c

index d2f1d0b990c9d007b86b8dd62398399891b6c0c6..f0915864fbdacb8dc34c51a04f37704a9878fc96 100644 (file)
@@ -45,7 +45,7 @@ static bool inotify_input_more(struct ioloop *ioloop)
           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;
                }