From 8f689d09814add5e1b22577cc104e2eb5e16c66f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 21 Oct 2011 01:04:05 +0200 Subject: [PATCH] in log read, check for EINTR instead of EAGAIN to avoid infinite loops --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.25.1