[CFR] reflect resolv.conf update to running application

Dan Nelson dnelson at allantgroup.com
Tue Aug 23 15:26:23 GMT 2005


In the last episode (Aug 23), Peter Jeremy said:
> On Mon, 2005-Aug-22 13:18:46 -0700, Matthew Reimer wrote:
> >How about just stat'ing resolv.conf if more than X seconds has
> >passed since the last stat, rather than for every lookup?
> 
> That reduces the number of stat() calls but doesn't resolve the
> possibility of reading a half-written resolv.conf.

Easy enough to only reread the file if stat tells you it's more than 2
seconds old.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-arch mailing list