X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=main.c;h=2fc3733faaf9a4e5205efee68915b282a221ffa5;hb=e19e9800b93dbaec566c43d752b9cf1a3c7c913b;hp=4282e4a6a250fa7ac3cd519d3ea4fa0a837dd46b;hpb=6f19c791d4fe0d9a6c59ebecb26156f17e80eb75;p=project%2Fnetifd.git diff --git a/main.c b/main.c index 4282e4a..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; @@ -129,7 +129,7 @@ retry: } proc->log_buf_ofs = len; - if (read_len == maxlen) + if (read_len > 0) goto retry; out: