]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r289315,r292216
authorvangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:49:59 +0000 (02:49 +0000)
committervangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:49:59 +0000 (02:49 +0000)
commitff208329de2da1edc7480cf15d724d6fd455c516
tree61d02e77daf8448aaf24984d02ac010bf2912967
parent0240e04bb5a2cd08e089ba31498a363312a8462a
MFC r289315,r292216

resolver: automatically reload /etc/resolv.conf

On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed.  If so, reload the file and reinitialize
the resolver library.  However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default.  Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

Relnotes:       yes
Sponsored by:   Dell Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@292464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/resolv/res_init.c
lib/libc/resolv/res_private.h
lib/libc/resolv/res_state.c