projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix interrupted read checks in log collection
[project/netifd.git]
/
main.c
diff --git
a/main.c
b/main.c
index
b17f053
..
256a022
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;