e$B31$5$se(B
e$B1sF#$G$9!#e(B
1.9 e$B$G!"e(BDRb.start_service e$B$He(B stop_service
e$B$r7+$jJV$9$H!“e(BEADDRINUSE e$B$,e(B
e$BH/@8$9$k$3$H$,$”$j$^$9!#e(B
$ ./ruby -Ilib -rdrb -e ’
loop do
p :start
DRb.start_service(“druby://localhost:9090”, 1)
DRb.stop_service
end
’
:start
:start
:start
/home/mame/work/ruby19/ruby/lib/drb/drb.rb:861:in initialize': Address already in use - bind(2) (Errno::EADDRINUSE) from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:861:in
open’
from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:861:in
open_server' from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:759:in
block in open_server’
from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:757:in each' from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:757:in
open_server’
from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:1342:in
initialize' from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:1630:in
new’
from /home/mame/work/ruby19/ruby/lib/drb/drb.rb:1630:in
start_service' from -e:4:in
block in ’
from -e:2:in loop' from -e:2:in
’
Thread#kill e$B$G%5!<%S%9$rDd;$7$F$$$k$h$&$G$9$,!"e(Bkill e$B$7$?8ee(B
join e$B$7$J$$e(B
e$B$H3N<B$K;`$s$@$+$I$&$+$o$+$i$J$$$H;W$$$^$9!#e(B1.8
e$B$G$O%?%$%%s%0$,$?$^$?$^e(B
e$BLdBj$K$J$C$F$$$J$$$@$1$J5$$,$7$^$9!#e(B
rubyspec
e$B$,$?$^$K<:GT$7$F]5F+$7$$$N$G!"$b$7$h$1$l$PD>$7$?$$$G$9!#0J2<$Ne(B
e$B%Q%C%A$GD>$j$^$9!#e(B
diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb
index a2c11f9…4712306 100644
— a/lib/drb/drb.rb
+++ b/lib/drb/drb.rb
@@ -1394,7 +1394,7 @@ module DRb
if Thread.current[‘DRb’] && Thread.current[‘DRb’][‘server’] ==
self
Thread.current[‘DRb’][‘stop_service’] = true
else
-
@thread.kill
-
end@thread.kill.join end