Issue #4950 has been updated by Tomoyuki Chikanaga.


??激?違????????<?ゃ?潟?鴻????????у??????????????障?ч???????????綮吟????????????с????帥?ゃ????若?鴻????????? polling ???????????????障????????????羯??????????????????????帥???????с????????
篁ヤ???????????? polling ????????>散??菴?????????????緇?????????????????篏????????障??????????????с??????????????

diff --git a/thread_pthread.c b/thread_pthread.c
index 4f66c4e..016c3e9 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1085,7 +1085,7 @@ thread_timer(void *p)
 	FD_ZERO(&rfds);
 	FD_SET(timer_thread_pipe[0], &rfds);
 
-	if (gvl->waiting > 0 || need_polling) {
+	if (gvl->waiting > 0 || need_polling || rb_signal_buff_size() > 0) {
 	    timeout.tv_sec = 0;
 	    timeout.tv_usec = TIME_QUANTUM_USEC;
 

----------------------------------------
Bug #4950: ??祉?弱????????違???腮?????激?違?????????篆<???????????鴻??激?違???????潟??????絎?茵???????????
http://redmine.ruby-lang.org/issues/4950

Author: Tomoyuki Chikanaga
Status: Open
Priority: Normal
Assignee: 
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-06-30 trunk 32335) [x86_64-darwin10.8.0]


篁ヤ????????????鴻??????????絎?茵?????????? [1,2] ??? [2,1] ???茵腓???????????????????緇?????????障????????
絎???????? [1] ???茵腓????????障??(腮???? [2] ????????????????????障??)???

a = []
trap(:INT) { a.push(1) }
trap(:TERM) { a.push(2) }

pid = $$
fork do
  sleep 0.5
  puts "send start"
  Process.kill(:INT, pid)
  Process.kill(:TERM, pid)
  puts "send end"
end

puts "sleep start"
sleep 3
puts "sleep end"
p a

Signal.trap ??????????????? puts ??????帥??????筝???鴻??激?違???????潟??????腟?篋???????????????茵??????????????????????с?????


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