summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-02 23:14:52 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-02 23:14:52 +0000
commitca37c5d41ea806065033c8d6e24ec3820f952a3b (patch)
treef1788f11969710609ec0799f32fb7f15b33a4a1c /process.c
parent2c68033a6d2d56d92a1ff787eb3d5913d98729b8 (diff)
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
Diffstat (limited to 'process.c')
-rw-r--r--process.c3
1 files changed, 3 insertions, 0 deletions
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);