[Dnsmasq-discuss] Don't set up inotify watch on resolv.conf if --port=0

Heikki Linnakangas hlinnaka at iki.fi
Mon Feb 5 18:47:54 UTC 2024


Hi,

I'm using dnsmasq as a DHCP server only, with --port=0. My system has 
very low limits on inotify watches, and sometimes it fails to start up with:

dnsmasq: failed to create inotify: No file descriptors available

I could raise the limits with systctl, but I started to wonder why 
dnsmasq is creating an inotify watch in the first place, as my 
configuration does not depend on any configuration files.

Please see the attached patch. It skips creating the inotify watch on 
resolv.conf, when --port=0 is used. AFAICS, any such notifications were 
ignored anyway.

- Heikki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-set-up-inotify-watch-on-resolv.conf-if-port-0.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20240205/724a837f/attachment.bin>


More information about the Dnsmasq-discuss mailing list