]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add missing thread names 11992/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 6 Jul 2022 16:20:43 +0000 (18:20 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 21 Sep 2022 13:09:26 +0000 (15:09 +0200)
pdns/dnsdist-lua.cc
pdns/dnsdistdist/dnsdist-discovery.cc

index c81cb6cbdecd37cae51e81810b65e98deaa71652..8e7ffb3ff945f33bd2ebdd88e227b8fcab48b4b9 100644 (file)
@@ -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
index 84ddb422e1895844cb3a4e5d568b4b28cc609fa8..8504308c360f8a6f91660c042d2543b815d744b4 100644 (file)
@@ -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);