]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threads: include name in error message
authorVictor Julien <vjulien@oisf.net>
Thu, 31 Oct 2024 19:26:08 +0000 (20:26 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 10 Jan 2025 08:16:36 +0000 (09:16 +0100)
When a thread fails to spawn, include the thread name in the error
message.

src/tm-threads.c

index 07f9a9390df04421fcb76735b76cfc524b604a6d..87696f37f15f6a3ce654ceedaa2b3d1cb27f24bd 100644 (file)
@@ -1683,7 +1683,7 @@ TmEcode TmThreadSpawn(ThreadVars *tv)
 
     int rc = pthread_create(&tv->t, &attr, tv->tm_func, (void *)tv);
     if (rc) {
-        FatalError("Unable to create thread with pthread_create(): retval %d: %s", rc,
+        FatalError("Unable to create thread %s with pthread_create(): retval %d: %s", tv->name, rc,
                 strerror(errno));
     }