]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
map: use control sockets instead of pipe from parent process
authorLukáš Ježek <lukas.jezek@nic.cz>
Mon, 27 Apr 2020 12:00:17 +0000 (14:00 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 26 Oct 2020 13:25:12 +0000 (14:25 +0100)
commit4d6bf767a273f985f24e86adaf04680e6ce2cdf2
tree873c3217224ad7aa72cfa3b6c2aa2f462ac675ec
parent43b405775f638d2f2e2f020a1364119918641c93
map: use control sockets instead of pipe from parent process

This change allows map() to work with systemd integration.

As a bonus the new client implementation is based on Lua cqueues
allows caller to wrap map() in worker.corroutine() and get
asynchronous execution/avoid blocking main loop.

Currently socket communication does not employ timeouts so a hang
instance will lead to hang map() call. This does not affect query
processing _if_ map() is being run in worker.corroutine.

Fixes: #554
Fixes: #620
.luacheckrc
NEWS
daemon/engine.c
daemon/engine.h
daemon/lua/distro-preconfig.lua.in
daemon/lua/kluautil.lua
daemon/lua/postconfig.lua
daemon/lua/sandbox.lua.in
daemon/main.c