зеркало из https://github.com/github/ruby.git
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
43c93dbdd9
Коммит
13fb747c37
|
@ -1,3 +1,9 @@
|
|||
Thu Apr 11 13:19:22 2013 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* 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@iDaemons.org>
|
||||
|
||||
* dir.c: Fix a typo.
|
||||
|
|
|
@ -79,9 +79,16 @@ module DRbCore
|
|||
signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
|
||||
Thread.list.each {|th|
|
||||
if th.respond_to?(:pid) && th[:drb_service] == @service_name
|
||||
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
|
|||
signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
|
||||
Thread.list.each {|th|
|
||||
if th.respond_to?(:pid) && th[:drb_service] == @service_name
|
||||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче