aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-30 04:28:28 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-30 04:28:28 +0000
commit36129ffce9fe909472cda01f00824c44a03bc18c (patch)
tree3a66c2dd136637589154baf7a86f1da2bb25f32a /thread_pthread.c
parent03c0b071b0e86ea8da99e48c671612b1222122fd (diff)
downloadruby-36129ffce9fe909472cda01f00824c44a03bc18c.tar.gz
thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case
[ruby-core:88088] [Misc #14937] [Bug #5343] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 8f63da2e93..1ab676bc89 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1613,9 +1613,10 @@ rb_sigwait_sleep(rb_thread_t *th, int sigwait_fd, const struct timespec *ts)
{
struct pollfd pfd;
+ pfd.fd = sigwait_fd;
+ pfd.events = POLLIN;
+
if (ubf_threads_empty()) {
- pfd.fd = sigwait_fd;
- pfd.events = POLLIN;
(void)ppoll(&pfd, 1, ts, 0);
check_signals_nogvl(th, sigwait_fd);
}