From 7dd60afea27c48fb9fff1141297506423422e681 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 6 Jul 2022 18:20:43 +0200 Subject: [PATCH] dnsdist: Add missing thread names --- pdns/dnsdist-lua.cc | 2 ++ pdns/dnsdistdist/dnsdist-discovery.cc | 2 ++ 2 files changed, 4 insertions(+) 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); -- 2.47.2