X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fjournal%2Fjournald.c;h=8d1b10d270aacbacfb5f2bd0ff053d329acd5c35;hb=f4bad2bd2abe8ae260a99a5336145d11efe79892;hp=08597ae3eb9630dc22b43151d7163336465a0ead;hpb=e156d769c3ee756cdb20f8522ace9ea459a82655;p=elogind.git diff --git a/src/journal/journald.c b/src/journal/journald.c index 08597ae3e..8d1b10d27 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -2148,6 +2148,10 @@ static int server_read_proc_kmsg(Server *s) { assert(s->proc_kmsg_fd >= 0); l = read(s->proc_kmsg_fd, s->proc_kmsg_buffer + s->proc_kmsg_length, sizeof(s->proc_kmsg_buffer) - 1 - s->proc_kmsg_length); + if (l == 0) /* the kernel is stupid and in some race + * conditions returns 0 in the middle of the + * stream. */ + return 0; if (l < 0) { if (errno == EAGAIN || errno == EINTR) @@ -2723,7 +2727,6 @@ static int server_init(Server *s) { s->rate_limit_burst = DEFAULT_RATE_LIMIT_BURST; s->forward_to_syslog = true; - s->import_proc_kmsg = true; s->max_level_store = LOG_DEBUG; s->max_level_syslog = LOG_DEBUG;