mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
d7fa4d837e
commit
951b090130
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed May 4 12:46:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* thread.c (rb_wait_for_single_fd): Added POLLNVAL check.
|
||||
based on a patch from Eric Wong at [ruby-core:35991].
|
||||
|
||||
Wed May 4 11:51:01 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||
|
||||
* io.c (rb_f_select): remove useless ifdef.
|
||||
|
|
5
thread.c
5
thread.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue