From: Felix Fietkau Date: Thu, 20 Oct 2011 23:04:05 +0000 (+0200) Subject: in log read, check for EINTR instead of EAGAIN to avoid infinite loops X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f689d09814add5e1b22577cc104e2eb5e16c66f;p=oweals%2Fnetifd.git in log read, check for EINTR instead of EAGAIN to avoid infinite loops --- diff --git a/main.c b/main.c index bed0edd..2fc3733 100644 --- a/main.c +++ b/main.c @@ -90,7 +90,7 @@ retry: maxlen = LOG_BUF_SIZE - proc->log_buf_ofs; read_len = len = read(fd->fd, buf, maxlen); if (len < 0) { - if (errno == EAGAIN) + if (errno == EINTR) goto retry; goto out;