cURL / Mailing Lists / curl-library / Single Mail


c-ares refreshing resolv.conf

From: Dima Tisnek <>
Date: Mon, 7 Feb 2011 20:54:35 -0700


I finally got to the point where I would be willing to conribute a
patch to re-read resolv.conf.

First, am I correct that none contibuted anything yet?

Second, what do you think of the following approach:
remember important values from fstat() on the files in /etc that were
read (on unix) or -1 if files were missing,
re-fstat these files on every new request (?)
re-fstat these files on new request that's more than X seconds from
last check (?)
optionally, add an explicit function call to force /etc reload and re-parse.

what would a reasonable value for X seconds be?
is it enough to check metadata or should I checksum the files
themselves perhaps?
should something be done if X seconds elapsed (or force reload called)
while an asynch resolution is ongoing?

I think I may not be able to test it on other OS's, win* and whatnot,
so someone would have to help me there.

List admin:
Received on 2011-02-08