RFC: Drop notice: KNetwork

Stephan Kulow coolo at kde.org
Thu Mar 1 10:42:20 GMT 2007


Am Donnerstag 01 März 2007 schrieb Andreas Aardal Hanssen:
> 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()?
>
Who said POSIX follows logic? If you want something that works, you will have 
to adopt to the world ;(

Greetings, Stephan




More information about the kde-core-devel mailing list