Issue #5757 has been updated by Tomoyuki Chikanaga.

File bug5757.patch added

Motohiro KOSAKI wrote:
> ???????????鴻?????????GVL腴九?????????????ubf_select?????脂?蚊???????????障??select???茯????с???????
> ubf_select???kill(VTALRM) ???鴻??????с????????筝????ubf_select_each?????若?違??????????????????
> ???????????綽?荀???????????茯?茘???с?????
絨?????????c?????????????帥?障???????????????ubf_select() ?????若?吟?????帥?ゃ????若?鴻????????с????????違???????障?ч????? rb_thread_wakeup_timer_thread() ?????若?吟??с?? signal_thread_list ???ャ??????????????帥?ゃ????若?鴻?????????腆阪????? blocking region ??????????????障?ч?√???????帥????????(絎??????????SIGVTALRM???篆?)???у??羈違?с?????
???????????帥?ゃ????若?鴻???????????激?違???????????????????????????? rb_threadptr_check_signal() ????????<?ゃ?潟?鴻?????????蚊??莨若?帥??????????? ubf_select() ??? rb_thread_wakeup_timer_thread() ?????若?違?????????????????激?違??????篆≦????????? SIGVTALRM ???紊??????<?ゃ?潟?鴻?????????罩≪?障?c????障?障??????醇?с???????????с????????????????障?????

thread_timer() ??? ping_signal_thread_list() ??? signal_thread_list ????????с?????????(????????腥?????c??)緇???? timer_thread_function() ??ф?違????? signal_thread_list ???<?ゃ?潟?鴻?????????菴遵?????????????翫??????????????????с???????????? signal_thread_list ??????с????????ャ???????違????????с????????????????障???????????????????ц申????????????????羞私???????障?????

----------------------------------------
Bug #5757: main thread???read???select??у????c??????????^C ??с???????罩祉????
http://redmine.ruby-lang.org/issues/5757

Author: Yui NARUSE
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: -


FreeBSD 9 ????? ./ruby ??莎????????? ^C ?????????????????????罩祉??障????????
./miniruby ??с?? -e'$stdin.read' ??с??????????с?????

篁?腟???帥????????main thread ??? read ??? select ??у????ゅ?翫????????菴???? blocking region ???
unblock.func ??? ubf_select ???荐???????????????с??????????????????激?違????????ャ??????
1. ??????????鴻????????? sighandler ?????若?違??????rb_thread_wakeup_timer_thread() ?????若?違?????
2. ??帥?ゃ????若?鴻?????????莎激??????thread_timer() -> timer_thread_function() -> rb_threadptr_check_signal() -> rb_threadptr_interrupt() -> (th->unblock.func)(th->unblock.arg) -> ubf_select() -> rb_thread_wakeup_timer_thread() ?????若?違?????
3. ??帥?ゃ????若?鴻?????????莎激??????thread_timer() -> timer_thread_function() -> rb_threadptr_check_signal() -> rb_threadptr_interrupt() -> (th->unblock.func)(th->unblock.arg) -> ubf_select() -> rb_thread_wakeup_timer_thread() ?????若?違?????
4. ??帥?ゃ????若?鴻?????????莎激??????thread_timer() -> timer_thread_function() -> rb_threadptr_check_signal() -> rb_threadptr_interrupt() -> (th->unblock.func)(th->unblock.arg) -> ubf_select() -> rb_thread_wakeup_timer_thread() ?????若?違?????
...

絲丞??????????ゃ????????緇??????????????с????????箴??????違??ubf_select() ?????? rb_thread_wakeup_timer_thread() ?????若?違????????????????????


-- 
http://redmine.ruby-lang.org