[LEDE-DEV] [PATCH] uloop: use a waker for notifying sigchld and loop cancel events
Felix Fietkau
nbd at nbd.name
Wed Jun 15 02:58:55 PDT 2016
On 2016-06-15 11:39, Conor O'Gorman wrote:
> On 09/06/16 03:20, Yousong Zhou wrote:
>> 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 at gmail.com>
>> ---
>> uloop-epoll.c | 2 +-
>> uloop-kqueue.c | 2 +-
>> uloop.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
>> 3 files changed, 63 insertions(+), 6 deletions(-)
>>
> Why not change the timeout?
Changing the timeout would not fix the race, and it would lead to
unnecessary process wakeups and extra latency for signal processing.
- Felix
More information about the Lede-dev
mailing list