[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: RFC: Drop notice: KNetwork
From:       Stephan Kulow <coolo () kde ! org>
Date:       2007-03-01 10:42:20
Message-ID: 200703011142.21329.coolo () kde ! org
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic