From ca37c5d41ea806065033c8d6e24ec3820f952a3b Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 2 Jul 2018 23:14:52 +0000 Subject: process.c (waitpid_nogvl): start timer thread polling for lossy SIGCHLD For systems with lossy SIGCHLD, an infinitely sleeping timer thread needs to be aware of rb_waitpid callers in the first place before it can check and reset polling status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'process.c') diff --git a/process.c b/process.c index cf8cc3ac96..695fd72119 100644 --- a/process.c +++ b/process.c @@ -1034,6 +1034,9 @@ waitpid_nogvl(void *x) * by the time we enter this. And we may also be interrupted. */ if (!w->ret && !RUBY_VM_INTERRUPTED_ANY(w->ec)) { + if (SIGCHLD_LOSSY) { + rb_thread_wakeup_timer_thread(); + } rb_native_cond_wait(w->cond, &th->interrupt_lock); } rb_native_mutex_unlock(&th->interrupt_lock); -- cgit v1.2.3