From: Motohiro KOSAKI Date: 2010-05-27T20:25:36+09:00 Subject: [ruby-dev:41437] [Bug #3354] エンコードを指定してread中にCtrl-Cで落ちる チケット #3354 が更新されました。 (by Motohiro KOSAKI) ここかな? #define blocking_region_begin(th, region, func, arg) \ do { \ (region)->prev_status = (th)->status; \ (th)->blocking_region_buffer = (region); \ ☆ ここでruby_thread_has_gvl_p()が偽を返すようになる set_unblock_function((th), (func), (arg), &(region)->oldubf); \ ★ ここでシグナルをチェックしてしまうのでSIGINTが見つかると rb_interrupt() が呼ばれてしまう (th)->status = THREAD_STOPPED; \ thread_debug("enter blocking region (%p)\n", (void *)(th)); \ RB_GC_SAVE_MACHINE_CONTEXT(th); \ native_mutex_unlock(&(th)->vm->global_vm_lock); \ ☆ ここで実際のGVLのアンロック } while (0) ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3354 ---------------------------------------- http://redmine.ruby-lang.org