From 47e0957e21213268dafa28287c9b669ecd65397e Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 22 Jul 2015 00:34:47 +0000 Subject: thread.c: return the error * thread.c (rb_wait_for_single_fd): return the error when ppoll failed. fix r51319. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- thread.c | 1 + 1 file changed, 1 insertion(+) (limited to 'thread.c') diff --git a/thread.c b/thread.c index 45f0fa7355..48115d8ddc 100644 --- a/thread.c +++ b/thread.c @@ -3694,6 +3694,7 @@ rb_wait_for_single_fd(int fd, int events, struct timeval *tv) RUBY_VM_CHECK_INTS_BLOCKING(th); } while (result < 0 && retryable(errno = lerrno) && poll_update()); + if (result < 0) return -1; if (fds.revents & POLLNVAL) { errno = EBADF; -- cgit v1.2.3