Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-07-07 20:17:40 +0400
committerJo-Philipp Wich <jow@openwrt.org>2012-07-07 20:17:40 +0400
commit0001d8ab26694f5f546da7e8f9d0575b49671500 (patch)
treec9b808e123dac6bb47dd392129e55f4d4f5fe4ba /uloop.c
parentbbdc3bdb0505437782f83d8d0480e759cbe7ea57 (diff)
uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events()
Diffstat (limited to 'uloop.c')
-rw-r--r--uloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uloop.c b/uloop.c
index bdda0cf..38da5f6 100644
--- a/uloop.c
+++ b/uloop.c
@@ -231,12 +231,12 @@ static void uloop_run_events(int timeout)
if (!u)
continue;
- if(events[n].events & EPOLLERR) {
+ if(events[n].events & (EPOLLERR|EPOLLHUP)) {
u->error = true;
uloop_fd_delete(u);
}
- if(!(events[n].events & (EPOLLRDHUP|EPOLLIN|EPOLLOUT|EPOLLERR)))
+ if(!(events[n].events & (EPOLLRDHUP|EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP)))
continue;
if(events[n].events & EPOLLRDHUP)