diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-07-31 00:32:40 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-07-31 00:32:40 +0200 |
commit | 7823ad9590d0ec54bca6f637e0d8b14794bb49c0 (patch) | |
tree | 481ecf5996bb80b67ae1bfd9213bac6f203f1464 | |
parent | 37ea780f269d189e98dbafe7654f83bf35c8a940 (diff) |
proc: consume all data after the pipe dies, instead of looping with 100% cpu usage
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | proc.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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) |