]> granicus.if.org Git - pdns/commit
rec: Wait until after daemonizing to start the RPZ and protobuf threads
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 16 Nov 2016 14:37:04 +0000 (15:37 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 17 Nov 2016 13:47:35 +0000 (14:47 +0100)
commit2168188114afee99e892d0c560a216076286488c
treeaa10a990aa99c53ea9efd9818ac0d1e803d27902
parent97b73fa7d37fe92709c5c69d999890a0488d507e
rec: Wait until after daemonizing to start the RPZ and protobuf threads

Otherwise they are killed when we call `fork()`.
We still want to actually parse the configuration to check for syntax
errors before daemonizing to be able to report any error, so when
`daemon` is set to `yes`, we parse the Lua configuration early
without starting any threads, and then again, starting the threads
that time, after daemonizing.

(cherry picked from commit a4241908a1c80c4293cfcd5056bb67138958f0e6)
pdns/pdns_recursor.cc
pdns/rec-lua-conf.cc
pdns/rec-lua-conf.hh
pdns/rec_channel_rec.cc