projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
416b413
)
fix interrupted read checks in log collection
author
Felix Fietkau
<nbd@openwrt.org>
Tue, 18 Oct 2011 18:12:08 +0000
(20:12 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Tue, 18 Oct 2011 18:12:08 +0000
(20:12 +0200)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index b17f053bb3ea351853d2855d94a41b3728da684f..256a0223ee88b50cac6440665f1552219e281a42 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-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 == E
INTR
)
+ if (len < 0) {
+ if (errno == E
AGAIN
)
goto retry;
goto out;
- }
+ } else if (len == 0)
+ goto out;
+
proc->log_buf_ofs += len;
cur = buf;