From: "Roy J. Milican" Date: 2002-04-19T21:44:42+09:00 Subject: Re: resolv.rb Bug -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Greetings, Thursday, April 18, 2002, 10:46:01 PM, you wrote: nnsn> Hi, nnsn> At Fri, 19 Apr 2002 12:57:28 +0900, nnsn> Roy J. Milican wrote: >> >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Greetings, >> >> Thursday, April 18, 2002, 8:30:57 PM, you wrote: >> >> nnsn> Hi, >> >> nnsn> At Fri, 19 Apr 2002 11:57:18 +0900, >> nnsn> Tanaka Akira wrote: >> >> > Sorry, I was wrong completely. Try with following patch. >> >> >> >> It causes an error with -d. >> >> nnsn> Oops, sender thread must be killed. >> >> >> nnsn> --- resolv.rb~ Fri Apr 19 11:36:35 2002 >> nnsn> +++ resolv.rb Fri Apr 19 12:29:55 2002 >> nnsn> @@ -509,6 +509,13 @@ class Resolv >> >> nnsn> def close >> nnsn> - @sock.close if @sock >> nnsn> - @sock = nil >> nnsn> + thread, sock, @thread, @sock = @thread, @sock >> nnsn> + begin >> nnsn> + if thread >> nnsn> + thread.kill >> nnsn> + thread.join >> nnsn> + end >> nnsn> + ensure >> nnsn> + sock.close if sock >> nnsn> + end >> nnsn> end >> >> >> >> >> Patching the 2 new patches and using the example you gave me I get the >> following error from ruby 1.6.6. >> >> /usr/local/lib/ruby/1.6/resolv.rb:545:in `close': undefined method `value' >> for {}:Hash (NameError) nnsn> It was a typo, but ignore older patches in [ruby-talk:38537], nnsn> [ruby-talk:38545] and apply only newer 2 in [ruby-talk:38613], nnsn> [ruby-talk:38620]. Sorry. Worked Like a Charm! Thanks for all your work on this issue. Roy - -- Roy Milican roy@milican.com �v -----BEGIN PGP SIGNATURE----- Version: PGP 6.5i iQA/AwUBPMAQ9QNBS2G+YzIDEQLcAACgn4VvqyeLnyA5l2m5mDstW1mwoEcAnRpa cxMKCaRsai62qSN5Ugt/zVvx =54DE -----END PGP SIGNATURE-----