summaryrefslogtreecommitdiff
path: root/ext/readline
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-04 01:13:02 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-04 01:13:02 +0000
commit4da4cb0421fbdd5c7a825addcda9c8725e86c844 (patch)
treeb8881539df9a5717eb5bb89ce628ef6a12314ad5 /ext/readline
parent82b2e8012048cdc6f6ee7659fdb25ffa53945d02 (diff)
* ext/readline/readline.c (readline_event): use rb_wait_for_single_fd().
The patch was written by Eric Wong. [Ruby 1.9 - Feature #4531] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/readline')
-rw-r--r--ext/readline/readline.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/readline/readline.c b/ext/readline/readline.c
index cb17d9c..c08d88b 100644
--- a/ext/readline/readline.c
+++ b/ext/readline/readline.c
@@ -145,11 +145,7 @@ readline_event(void)
#if BUSY_WAIT
rb_thread_schedule();
#else
- rb_fdset_t fds;
-
- rb_fd_init(fds);
- rb_fd_set(fileno(rl_instream), &fds);
- rb_thread_fd_select(fileno(rl_instream) + 1, &fds, NULL, NULL, NULL);
+ rb_wait_for_single_fd(fileno(rl_instream), RB_WAITFD_IN, NULL);
return 0;
#endif
}