Had a reply from Simon Kelly (upstream). The worry is about race conditions and reading /etc/hosts or resolv.conf after the 'mtime' has been changed, but before the file has been completely written out (dnsmasq already tries to backoff and schedule a re-read a couple of seconds late if it finds an incomplete file). The preferred solution is for the process modifying the appropriate file to manually send:
sudo killall -HUP dnsmasq
to the process.
Currently (on Ubuntu) dnsmasq is run as uid='nobody', so these needs elevated privileges (which are needed anyway for editing those files). This is okay for a human, but is less automatic than the previous situation where /etc/hosts was being watched.
Had a reply from Simon Kelly (upstream). The worry is about race conditions and reading /etc/hosts or resolv.conf after the 'mtime' has been changed, but before the file has been completely written out (dnsmasq already tries to backoff and schedule a re-read a couple of seconds late if it finds an incomplete file). The preferred solution is for the process modifying the appropriate file to manually send:
sudo killall -HUP dnsmasq
to the process.
Currently (on Ubuntu) dnsmasq is run as uid='nobody', so these needs elevated privileges (which are needed anyway for editing those files). This is okay for a human, but is less automatic than the previous situation where /etc/hosts was being watched.