From: Remi Gacogne Date: Wed, 6 Jul 2022 16:20:43 +0000 (+0200) Subject: dnsdist: Add missing thread names X-Git-Tag: rec-4.9.0-alpha0~28^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11992%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Add missing thread names --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index c81cb6cbde..8e7ffb3ff9 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -57,6 +57,7 @@ #include "base64.hh" #include "dolog.hh" #include "sodcrypto.hh" +#include "threadname.hh" #ifdef HAVE_LIBSSL #include "libssl.hh" @@ -269,6 +270,7 @@ void checkParameterBound(const std::string& parameter, uint64_t value, size_t ma static void LuaThread(const std::string code) { + setThreadName("dnsdist/lua-bg"); LuaContext l; // mask SIGTERM on threads so the signal always comes to dnsdist itself diff --git a/pdns/dnsdistdist/dnsdist-discovery.cc b/pdns/dnsdistdist/dnsdist-discovery.cc index 84ddb422e1..8504308c36 100644 --- a/pdns/dnsdistdist/dnsdist-discovery.cc +++ b/pdns/dnsdistdist/dnsdist-discovery.cc @@ -27,6 +27,7 @@ #include "dnsparser.hh" #include "dolog.hh" #include "sstuff.hh" +#include "threadname.hh" namespace dnsdist { @@ -497,6 +498,7 @@ bool ServiceDiscovery::tryToUpgradeBackend(const UpgradeableBackend& backend) void ServiceDiscovery::worker() { + setThreadName("dnsdist/discove"); while (true) { time_t now = time(nullptr);