gethostbyname() and resolv.conf updates

Colin Walters walters at verbum.org
Fri Jun 18 13:43:28 UTC 2010


On Fri, Jun 18, 2010 at 8:23 AM, Stephen Gallagher <sgallagh at redhat.com> wrote:
>
> This is the entire purpose of the res_init() function in glibc. If your
> application needs to be aware of a change in resolv.conf, you should be
> monitoring it with inotify and calling res_init() anytime the file is
> changed.

That's awful.  Really, really awful.  Do you have any idea how many
things would need to be patched to do that?  Other operating systems
handle this just fine.  Asking every component to use inotify and
res_init() because the glibc maintainers apparently think a simple
stat() on a sure-to-be-in-kernel cache inode is too expensive...well,
think about it.


More information about the devel mailing list