Once upon a time, Neal D. Becker <nbecker@xxxxxxx> said:Yup.
On Friday 06 June 2003 10:13 am, John Haxby wrote:
The second part is slightly harder -- the resolver library needs toNot sure what you mean here. If you change /etc/resolv.conf the result is immediately seen when a new program is run. Do you mean that you also want an already running program to see the change? (I'm not sure what the current behaviour is in this case).
check to see if /etc/resolv.conf has changed and if it has, it needs to
re-load it.
The behaviour is that running programs continue to use to previous contents of /etc/resolv.conf. This can be a real problem, as that includes things like syslogd (some versions basically hang when they can't resolve IPs, and that can cause all kinds of other programs to hang when they try to log something).
It would be nice if the resolver library would stat() /etc/resolv.confNo, not quite, that fixes the problem while keeping some annoying aspects. If the resolver library doesn't have a name cached locally, it should check to see if /etc/resolv.conf has changed since it last looked, if it has, then re-load it. Since you're having to go out on to the net to resolve a name, this extra stat() won't make any significant impact on performance. I think.
periodically (no more than once per minute) to see if there has been a
change.
Hmm. I wonder if nscd would help here -- it might be enough to just restart that when the network changes ... I've never really felt the need to use it, maybe I should.
jch