Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: detect changes to /etc/resolv.conf #6670
net/dnsclient_unix.go has a TODO(rsc) near the top: // Check periodically whether /etc/resolv.conf has changed. This would be very useful for us. (Not for Go 1.2, I know.) I'd happily put in the effort to implement this, but I'd like to discuss first, to ensure that I take a good approach and to check that there's nothing else planned that makes this moot. The obvious question is around the "check periodically" part. Options include, e.g.: * Use fsnotify (extracted from or after #4068) * Stat every n seconds * Stat every n requests * Stat after n DNS failures * Stat on first request after n seconds have elapsed since last stat Input on this? Anything else I should be asking here?
Since os/fsnotify is in the works, I'd like to wait for it to land and use it here, even if it means that this doesn't make it into Go 1.3. (I'll do my best to get it in, though, if os/fsnotify arrives in time.)
Owner changed to @josharian.