1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
normal 2018-07-02 23:14:52 +00:00
parent 2c68033a6d
commit ca37c5d41e

View file

@ -1034,6 +1034,9 @@ waitpid_nogvl(void *x)
* by the time we enter this. And we may also be interrupted. * by the time we enter this. And we may also be interrupted.
*/ */
if (!w->ret && !RUBY_VM_INTERRUPTED_ANY(w->ec)) { 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_cond_wait(w->cond, &th->interrupt_lock);
} }
rb_native_mutex_unlock(&th->interrupt_lock); rb_native_mutex_unlock(&th->interrupt_lock);