projects
/
project
/
ubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdcacad
)
logread: use oneshot mode without -f, wait for logd to close
author
Felix Fietkau
<
[email protected]
>
Mon, 6 Nov 2017 10:28:33 +0000
(11:28 +0100)
committer
Felix Fietkau
<
[email protected]
>
Mon, 6 Nov 2017 10:28:35 +0000
(11:28 +0100)
Fixes a race condition in dealing with larger amounts of log data
Signed-off-by: Felix Fietkau <
[email protected]
>
log/logread.c
patch
|
blob
|
history
diff --git
a/log/logread.c
b/log/logread.c
index 994c88beaa091319dd031c72e1ce51e599c94709..0cae75ba27f654a929530ca72634e43b57e7b373 100644
(file)
--- a/
log/logread.c
+++ b/
log/logread.c
@@
-236,8
+236,6
@@
static void logread_fd_data_cb(struct ustream *s, int bytes)
log_notify(a);
ustream_consume(s, cur_len);
}
- if (!log_follow)
- uloop_end();
}
static void logread_fd_state_cb(struct ustream *s)
@@
-337,6
+335,7
@@
int main(int argc, char **argv)
blob_buf_init(&b, 0);
blobmsg_add_u8(&b, "stream", 1);
+ blobmsg_add_u8(&b, "oneshot", !log_follow);
if (lines)
blobmsg_add_u32(&b, "lines", lines);
else if (log_follow)