cURL / Mailing Lists / curl-library / Single Mail


Re: c-ares refreshing resolv.conf

From: Kamil Dudka <>
Date: Tue, 8 Feb 2011 10:22:26 +0000

On Tuesday 08 February 2011 09:01:19 Dirk Manske wrote:
> Polling is always an ugly solution. If you really want to poll
> /etc for changes every X seconds, then that X should be
> configurable.
> But I would use (on Linux) inotify (in my program, not libcurl)
> to watch resolv.conf etc. for changes and trigger the reload
> function.

In the Fedora installer, we use res_init(3) to force glibc to re-read
/etc/resolv.conf. It would be nice if libcurl provided a wrapper around
it and then call the c-ares specific routine in case curl is built
against c-ares.

List admin:
Received on 2011-02-08