On Wed, Apr 12, 2000 at 12:07:40AM -0700, Ming Zhang wrote:
> > In your case, both the threads are waiting for a DNS server response,
> > so the thread scheduler doesn't have a thread to schedule.
> 
> If I only create one thread, then the gethostbyname() returns immediately. 
> By using truss -p, it seems that gethostbyname() uses a static socket var
> for the DNS I/O rather than a local one, and that I think is what caused
> the threads to hang.  Or, we're talking about the same thing?

Ah, I see. So your problem is due to the non-reentrant nature of the
implementation rather than the blocking nature (as I assumed earlier).

While we're on the topic, it'd also be useful to have a DNS lookup
mechanism, that's per domain/adapter. If I have a laptop connected to
two private domains foo.com and bar.com, I wan't nslookups on *.foo.com
to go to one DNS server and *.bar.com to another. That'd require a per
domain or per adapter /etc/resolv.conf

        -Arun


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to