diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-10-18 20:12:08 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-10-18 20:12:08 +0200 |
commit | 6dfd44e127c153e721a398f22b510be1a5e9d0b0 (patch) | |
tree | 04505b7a0c6ce960fb9ca4332205704621c2bc89 /main.c | |
parent | 416b41368c72d3af4c0e89a7b522b28ea13a6ce4 (diff) |
fix interrupted read checks in log collection
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -94,12 +94,14 @@ netifd_process_log_cb(struct uloop_fd *fd, unsigned int events) retry: read_len = len = read(fd->fd, buf, maxlen); - if (len <= 0) { - if (errno == EINTR) + if (len < 0) { + if (errno == EAGAIN) goto retry; goto out; - } + } else if (len == 0) + goto out; + proc->log_buf_ofs += len; cur = buf; |