diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-11 16:55:14 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-07-11 16:55:14 +0000 |
commit | 143bcae67bd1f5c24f09eeacfa98db853ad030d0 (patch) | |
tree | 5f4cd4da24a295798681167ec3e60d0f8c829dbc | |
parent | c7394d5e9c2a8d38e10ae01e40155e2c7b18aad0 (diff) | |
download | ruby-143bcae67bd1f5c24f09eeacfa98db853ad030d0.tar.gz ruby-143bcae67bd1f5c24f09eeacfa98db853ad030d0.tar.xz ruby-143bcae67bd1f5c24f09eeacfa98db853ad030d0.zip |
* win32/win32.c (rb_w32_select): shoudn't pass non-socket handle to
original select().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | win32/win32.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Sat Jul 12 01:54:13 2008 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (rb_w32_select): shoudn't pass non-socket handle to + original select(). + Fri Jul 11 23:05:40 2008 Yusuke Endoh <mame@tsg.ne.jp> * test/zlib/test_zlib.rb: add a test for Zlib::Deflate#params. diff --git a/win32/win32.c b/win32/win32.c index d3ba3fa07..11774cda1 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2150,6 +2150,7 @@ rb_w32_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex, fd_set cons_rd; fd_set else_rd; fd_set else_wr; + fd_set except; int nonsock = 0; if (nfds < 0 || (timeout && (timeout->tv_sec < 0 || timeout->tv_usec < 0))) { @@ -2178,6 +2179,9 @@ rb_w32_select(int nfds, fd_set *rd, fd_set *wr, fd_set *ex, else_wr.fd_count = 0; nonsock += extract_fd(&else_wr, wr, is_not_socket); + except.fd_count = 0; + extract_fd(&except, ex, is_not_socket); // drop only + r = 0; if (rd && rd->fd_count > r) r = rd->fd_count; if (wr && wr->fd_count > r) r = wr->fd_count; |