[Dnsmasq-discuss] Move 'dnssec time check enable' from SIGHUP to SIGUSR2

Simon Kelley simon at thekelleys.org.uk
Sun Jan 14 22:12:53 GMT 2018


Right, I thought about this again, and concluded that whilst sharing the
"now use the time" function with something other than "reload loads of
stuff" is an improvement, it doesn't really get us that much farther to
share with something else, since conflicts could still arise.

For instance sharing with USR2, which restarts the log file, could bite
if the logs get rotated at startup.

The obvious thing to do is to use a different signal, and poking around
the documentation, it's clear that there is a candidate, SIGINT. This is
not going to get sent for spurious reasons - the only time it gets send
is from the shell when you hit ctrl-c - and it can be reassigned as
required.

The only odd thing I've done is to preserve the default action of SIGINT
when in debug mode - that makes life easier when keeping dnsmasq in the
foreground to run it in gdb or to test stuff. This is not a big thing:
quite a lot of stuff runs subtly differently in debug mode to make it
easier to debug whilst not being a full-fledged daemon. There's a
seperate "run in foreground" flag for use with daemon-tools etc that
doesn't make these adjustments.

Given that this is a meant to be a definitive solution, I judge it's
worth taking the one-time backward compatibility hit, and have left out
the ability to select which signal to use.

http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=3c973ad92d317df736d5a8fde67baba6b102d91e


Comments?


Cheers,

Simon.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180114/d070e05a/attachment.sig>


More information about the Dnsmasq-discuss mailing list