summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-08 12:51:36 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-08 12:51:36 +0000
commit79e46488e82402c5db6ca403597508e0e7fed059 (patch)
tree29a9baeb233ec281817d19bb20a4506e3b2b3402 /thread.c
parent558b9d05b2c940ce3ffab1567cd1e050e1cf2f75 (diff)
* thread.c (rb_wait_for_single_fd): Clean up fds.revents every time
before calling ppoll(2). [Bug #12575] [ruby-dev:49725] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/thread.c b/thread.c
index 1aa1c7983e..a53117ab82 100644
--- a/thread.c
+++ b/thread.c
@@ -3851,6 +3851,7 @@ rb_wait_for_single_fd(int fd, int events, struct timeval *tv)
fds.events = (short)events;
do {
+ fds.revents = 0;
lerrno = 0;
BLOCKING_REGION({
result = ppoll(&fds, 1, timeout, NULL);