RFC: Drop notice: KNetwork

Andreas Aardal Hanssen ahanssen at trolltech.com
Thu Mar 1 09:55:53 GMT 2007


On Thursday 01 March 2007 10:49, Thiago Macieira wrote:
> >QHostInfo uses gethostbyname(), which immediately adopts to changes
> >in /etc/resolv.conf.
> I don't think it does. That's exactly why the res_init call was added over
> 6 years ago:
> I've taken a look at QHostInfo code and I know why it appears to work:
> it's threaded. And on Linux/glibc, the resolver status is kept
> per-thread. So every time the thread dies and starts again, res_init is
> automatically called by glibc itself.

QHostInfo::fromName() doesn't use threads. It just works.

If you think of it, it just makes sense. Why should everyone who uses 
gethostbyname() have to know that occasionally, they have to call res_init()?

(which is part of resolv.h, requires linking against libresolv...)

> This will not translate to other systems. Will we have to?

What systems?

-- 
Andreas Aardal Hanssen - andreas . hanssen @ trolltech.com
Trolltech AS - Waldemar Thranes gt. 98, NO-0175 Oslo, Norway




More information about the kde-core-devel mailing list