diff --git a/ChangeLog b/ChangeLog index 155dc564eb..959fa6e530 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 9 08:47:38 2008 Yukihiro Matsumoto + + * thread.c (rb_thread_wait_fd_rw): should not block by select if + there's only one thread living. fixed [ruby-dev:36646]. + Wed Oct 8 20:59:52 2008 Masaki Suketa * ext/win32ole/win32ole.c (ole_init_cp): initialize WIN32OLE.codepage diff --git a/thread.c b/thread.c index 646223e8f5..cf667e19db 100644 --- a/thread.c +++ b/thread.c @@ -2235,6 +2235,7 @@ rb_thread_wait_fd_rw(int fd, int read) if (fd < 0) { rb_raise(rb_eIOError, "closed stream"); } + if (rb_thread_alone()) return; while (result <= 0) { rb_fdset_t set; rb_fd_init(&set);