cache: improve out-of-disk condition
When suspect SIGBUS happens, print helpful error and try to remove the cache, so that the service might work again if auto-restarted.
Theoretically we could longjmp() out of the SIGBUS handler, but that would be rather messy, so let the process die.
Fixes https://gitlab.labs.nic.cz/knot/knot-resolver/issues/197 (in a sense).
Output:
SIGBUS received; this is most likely due to filling up the filesystem where cache resides.
Cache file deleted.
kresd can not recover reliably by itself, exiting.
(and the process exits as if SIGBUS had been unhandled)
Edited by Vladimír Čunát