summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-07-31 00:32:40 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-07-31 00:32:40 +0200
commit7823ad9590d0ec54bca6f637e0d8b14794bb49c0 (patch)
tree481ecf5996bb80b67ae1bfd9213bac6f203f1464 /proc.c
parent37ea780f269d189e98dbafe7654f83bf35c8a940 (diff)
proc: consume all data after the pipe dies, instead of looping with 100% cpu usage
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/proc.c b/proc.c
index 67356dd..5be6232 100644
--- a/proc.c
+++ b/proc.c
@@ -282,9 +282,8 @@ static int proc_data_send(struct client *cl, const char *data, int len)
if (errno == EAGAIN || errno == EWOULDBLOCK)
break;
- /* error, no retry */
- len = 0;
- break;
+ /* consume all data */
+ ret = len;
}
if (!ret)