summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-30 06:02:22 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-30 06:02:22 +0000
commit56491afc7916fb24f5c4dc2c632fb93fa7063992 (patch)
tree66c22f4ed951ddca5015ea8f733b3f456832202e /thread_pthread.c
parentab47a57a46e70634d049e4da20a5441c7a14cdec (diff)
thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index e064bf71be..c4cbd77ac5 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1664,7 +1664,7 @@ rb_sigwait_sleep(rb_thread_t *th, int sigwait_fd, const struct timespec *ts)
n = ppoll(&pfd, 1, to, 0);
if (check_signals_nogvl(th, sigwait_fd))
return;
- if (n || RUBY_VM_INTERRUPTED(th->ec))
+ if (n || (th && RUBY_VM_INTERRUPTED(th->ec)))
return;
if (ts && timespec_update_expire(&diff, &end))
return;