From 1d15cf4bebc379a0f70306ae165680ffe4a12d87 Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 28 Jun 2012 08:58:21 +0000 Subject: merge revision(s) 32549,32557: [Backport #6661] * win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed from rb_w32_has_cancel_io(). now it takes a parameter as fd to check the fd is console or not, because we cannot cancel console input even if we have cancel_io function. * io.c (WAIT_FD_IN_WIN32): call above function instead of the old one, so now we can kill the thread which calls STDIN.gets. the problem was reported by ko1 vir IRC. * win32/win32.c (is_socket, is_console): add prototypes to fix compile problem with gcc introduced at r32549. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@36244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') diff --git a/io.c b/io.c index c664450311..bb75ece9e4 100644 --- a/io.c +++ b/io.c @@ -193,7 +193,7 @@ rb_update_max_fd(int fd) #if defined(_WIN32) #define WAIT_FD_IN_WIN32(fptr) \ - (rb_w32_has_cancel_io() ? 0 : rb_thread_wait_fd((fptr)->fd)) + (rb_w32_io_cancelable_p((fptr)->fd) ? 0 : rb_thread_wait_fd((fptr)->fd)) #else #define WAIT_FD_IN_WIN32(fptr) #endif -- cgit v1.2.3