]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r289315, r292216
authorvangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:41:31 +0000 (02:41 +0000)
committervangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 19 Dec 2015 02:41:31 +0000 (02:41 +0000)
commit9f5504e6da3ab52f4fe9612763832c5d3e1ae739
tree83f00a984fb131904f8621162a28cdfffaa7e50e
parent076747778accd4e9db5b75a860e9b1c6da50157f
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/10@292462 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/resolv/res_init.c
lib/libc/resolv/res_private.h
lib/libc/resolv/res_state.c
share/man/man5/resolver.5