[ntp:hackers] Asynch resolver

Brian Utterback brian.utterback at sun.com
Mon May 8 13:26:39 UTC 2006

Paul Vixie wrote:

> if we really do have to run NIS as well, then eventlib is a non-starter
> since NIS depends on Sun RPC and none of us are willing to re-implement
> THAT in terms of eventlib primatives.
> dave, is there some problem with combining pipe(), fork(), and
> gethostbyname()?  i don't understand why we would need temporary files.

It is not only NIS. It is NIS, NIS+, LDAP and any number of other
possible naming services. The bottom line is that the getaddrinfo
call can and does block, for arbitrarily long periods of time.

I think I agree with Paul here. I don't know about other platforms,
but my understanding is that the standard POSIX way to do this
is with pipes and fork. I also agree with Danny in that we should
be using everything that we get back from the call, not just the
first IP address found. In fact, I could see having "ntp_getaddrinfo"
as a shim that does all the rest of the forks and pipes under the


Rose are #FF0000, Violets are #0000FF. All my base are belong to you.
Brian Utterback - OP/N1 RPE, Sun Microsystems, Inc.
Ph:877-259-7345, Em:brian.utterback-at-ess-you-enn-dot-kom

More information about the hackers mailing list