From 4e3a47a4cb438866bc4b9cb2f5d16226ffb48502 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Thu, 9 Jun 2016 10:20:32 +0800 Subject: 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 Signed-off-by: Felix Fietkau --- uloop-kqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'uloop-kqueue.c') diff --git a/uloop-kqueue.c b/uloop-kqueue.c index 0cb1c14..ba5595b 100644 --- a/uloop-kqueue.c +++ b/uloop-kqueue.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -int uloop_init(void) +static int uloop_init_pollfd(void) { struct timespec timeout = { 0, 0 }; struct kevent ev = {}; -- cgit v1.2.3