On 05/09/15 15:42, Guido Günther wrote:
> Package: dnsmasq
> Version: 2.72-3+deb8u1
> Severity: wishlist
> 
> Hi,
> it would be awesome if dnsmasq could use inotify in case of
> 
> --addn-hosts=/a/directory/
> 
> this would allow one to dump new files in there (and modify existing
> ones) without reloading dnsmasq. The use case is creating hosts entries
> for VMs popping up (and disappearing) on the network.
> Cheers,
>  -- Guido
> 

The policy in the past has been to re-load /etc/resolv.conf and friends
automatically when they change, as systems which re-write resolv.conf
tend to assume that's all that needs to happen. For other configuration,
(including addn-hosts) sending SIGHUP to the dnsmasq process causes a
re-read. This is more conventional, and safer from race conditions, for
instance reading a file before it has been completely written.


Is there a good reason not to use SIGHUP in this case?


Cheers,

Simon.

Reply via email to