summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-15 05:33:45 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-15 05:33:45 +0000
commitf15d0deaaf1ae0b92c539bd823dd2b00afbaf502 (patch)
treeb127e79147cbb4dbd25369a9ec0d6eb1f10ff52c /io.c
parente56f2abe4b775dcee4690ef43cbac71bbce2a5af (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index 2a161ed424..090f383849 100644
--- a/io.c
+++ b/io.c
@@ -188,7 +188,7 @@ static int max_file_descriptor = NOFILE;
#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