configuration reload / SIGHUP
Hello,
I am wondering whether you could and want to implement SIGHUP signal to the daemon. It would be useful for config reload. Especially the static host files. I could not find anything regarding reloading the config in the docs nor the issues. So I am assuming that it is not implemented.
My desired use is to integrate AdBlocking host list to the Knot Resolver and update the list daily. That means reloading only hints would be enough. But this feature would also come in handy when changing certificates. For example I am using Let's Encrypt certificates and those last only 90 days or so.
Thank you in advance.
Interesting related resources:
- https://en.wikipedia.org/wiki/Signal_(IPC)#SIGHUP
- http://perldoc.perl.org/perlipc.html#Handling-the-SIGHUP-Signal-in-Daemons
Notes by @pspacek: Pure config reload is hard to do because our config is a program and it can modify a lot of stuff. We might consider a variant of a quick restart:
- stop accepting new connections on sockets
- finish all pending requests
- re-exec kresd inside the same process without closing sockets (what about other shared state?)
- new kresd will process pending requests which piled up in system buffers in meanwhile
It surely will not handle everything under extreme load but it might be good enough for smaller use-cases.