diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-04 03:47:33 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-04 03:47:33 +0000 |
commit | 951b0901302d851bac96341f181c8f0a1ece54d1 (patch) | |
tree | b179c1a252ab9b1563b30426b3abd9bada65c4c3 /thread.c | |
parent | d7fa4d837eff72adae21f0504fa9ccacab7f7019 (diff) |
* thread.c (rb_wait_for_single_fd): Added POLLNVAL check.
based on a patch from Eric Wong at [ruby-core:35991].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2737,7 +2737,10 @@ retry: }, ubf_select, GET_THREAD()); if (result > 0) { - /* remain compatible with select(2)-based implementation */ + if (fds.revents & POLLNVAL) { + errno = EBADF; + return -1; + } result = (int)(fds.revents & fds.events); return result == 0 ? events : result; } |