curl-library
Re: c-ares refreshing resolv.conf
Date: Tue, 8 Feb 2011 10:01:19 +0100
On Tuesday 08 February 2011 04:54:35 Dima Tisnek wrote:
> I finally got to the point where I would be willing to conribute a
> patch to re-read resolv.conf.
> optionally, add an explicit function call to force /etc reload and re-parse.
IHMO this is the most usefull approach.
> what would a reasonable value for X seconds be?
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.
Just my 2ct,
Dirk Manske.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-08