Bug? - Resolv.getnames hanging after being interrupted

T

Thomas Leitner

Hi everybody,

I came across some weird behavior and I don't know if it is a bug or
not. If you execute the following command it will run okay first, but
when Resolv.getnames gets interrupted by the timeout, it sometimes
stops working:

ruby -rresolv -e '1.upto(5) {begin; timeout(1) {1.upto(255) {|i| p [i,
Resolv.getnames("72.14.207.99")] }}; rescue Timeout::Error; p "end";
end}'

I have tested this on
* Ubuntu 6.06 with ruby 1.8.4 (2005-12-24) [i486-linux] where it works
fine
* Ubuntu 6.06 with ruby 1.8.6 (2008-03-03 patchlevel 114) [i686-linux]
where it sometimes works but more often just hangs and does not
resolve the ip anymore
* Mac OSX 10.5.2 with ruby 1.8.6 (2007-09-23 patchlevel 110) [i686-
darwin8.11.1] where it also hangs nearly every time

Resolv.getnames also sometimes stops working without being
interrupted, by just calling it a lot...

Maybe someone can shed some light on this?!

-- Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top