[Pythonmac-SIG] socket.getaddrinfo problems

Jack Jansen Jack.Jansen at cwi.nl
Tue Apr 20 04:49:54 EDT 2004


On 19-apr-04, at 22:26, Eric Nieuwland wrote:

> Jack and all,
>
> Doesn't this imply that the Mac version of some socket methods would 
> better use lookupd?

This is easy to test. I did the test, but with gethostbyname(), not 
getaddrinfo().

I started a Python loop that did gethostbyname() and printed how much 
time it took. Then in another window I did "sudo killall -HUP lookupd". 
Interestingly enough, this was not noticeable in the timing. This 
probably means that that watchdog that restarts lookupd when it crashes 
reacts pretty fast.

So next I did "sudo killall -STOP lookupd", and indeed: the loop 
immediately stopped running. So did the rest of the machine, a few 
seconds later: apparently calls using lookupd are all over the place 
(probably log messages and such too).
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman




More information about the Pythonmac-SIG mailing list