diff options
author | Yousong Zhou <yszhou4tech@gmail.com> | 2016-06-09 05:20:32 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-06-15 12:54:37 +0300 |
commit | 4e3a47a4cb438866bc4b9cb2f5d16226ffb48502 (patch) | |
tree | 1261027a581bd5f24ce2360677e776317c463bca /uloop-epoll.c | |
parent | 1257a38a6e64511207bb3b077ca7e8e1a3338fc1 (diff) |
uloop: use a waker for notifying sigchld and loop cancel events
Fix a race condition when do_sigchld, uloop_cancelled were set just
before epoll_wait(timeout=-1), resulting the loop stuck in the syscall
without noticing the events just happened
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'uloop-epoll.c')
-rw-r--r-- | uloop-epoll.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/uloop-epoll.c b/uloop-epoll.c index bb652fd..6014bea 100644 --- a/uloop-epoll.c +++ b/uloop-epoll.c @@ -23,7 +23,7 @@ #define EPOLLRDHUP 0x2000 #endif -int uloop_init(void) +static int uloop_init_pollfd(void) { if (poll_fd >= 0) return 0; |