ruby-changes:28180
From: usa <ko1@a...>
Date: Thu, 11 Apr 2013 13:21:43 +0900 (JST)
Subject: [ruby-changes:28180] usa:r40232 (trunk): * test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.kill
usa 2013-04-11 13:21:34 +0900 (Thu, 11 Apr 2013) New Revision: 40232 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40232 Log: * test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.kill if it fails with Errno::EPERM on Windows (workaround). [ruby-dev:47245] [Bug #8251] Modified files: trunk/ChangeLog trunk/test/drb/drbtest.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 40231) +++ ChangeLog (revision 40232) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Apr 11 13:19:22 2013 NAKAMURA Usaku <usa@r...> + + * test/drb/drbtest.rb (Drb{Core,Ary}#teardown): retry Process.kill + if it fails with Errno::EPERM on Windows (workaround). + [ruby-dev:47245] [Bug #8251] + Thu Apr 11 11:11:38 2013 Akinori MUSHA <knu@i...> * dir.c: Fix a typo. Index: test/drb/drbtest.rb =================================================================== --- test/drb/drbtest.rb (revision 40231) +++ test/drb/drbtest.rb (revision 40232) @@ -79,9 +79,16 @@ module DRbCore https://github.com/ruby/ruby/blob/trunk/test/drb/drbtest.rb#L79 signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM Thread.list.each {|th| if th.respond_to?(:pid) && th[:drb_service] == @service_name - begin - Process.kill signal, th.pid - rescue Errno::ESRCH + 10.times do + begin + Process.kill signal, th.pid + break + rescue Errno::ESRCH + break + rescue Errno::EPERM # on Windows + sleep 0.1 + retry + end end th.join end @@ -296,9 +303,16 @@ module DRbAry https://github.com/ruby/ruby/blob/trunk/test/drb/drbtest.rb#L303 signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM Thread.list.each {|th| if th.respond_to?(:pid) && th[:drb_service] == @service_name - begin - Process.kill signal, th.pid - rescue Errno::ESRCH + 10.times do + begin + Process.kill signal, th.pid + break + rescue Errno::ESRCH + break + rescue Errno::EPERM # on Windows + sleep 0.1 + retry + end end th.join end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/