chiark / gitweb /
readahead-collect: ignore EACCES for fanotify
authorHarald Hoyer <harald@redhat.com>
Wed, 25 May 2011 11:09:08 +0000 (13:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 25 May 2011 15:59:00 +0000 (17:59 +0200)
At the start of auditd, we are temporarily not able to read
from the fanotify fd. Ignoring it, seems to work.

src/readahead-collect.c

index 3c48a02..913a340 100644 (file)
@@ -380,7 +380,7 @@ static int collect(const char *root) {
 
                 if ((n = read(fanotify_fd, &data, sizeof(data))) < 0) {
 
-                        if (errno == EINTR || errno == EAGAIN)
+                        if (errno == EINTR || errno == EAGAIN || errno == EACCES)
                                 continue;
 
                         log_error("Failed to read event: %m");