aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}