]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
threads: improve spawn failure error reporting
authorVictor Julien <vjulien@oisf.net>
Tue, 1 Aug 2023 12:00:54 +0000 (14:00 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 1 Aug 2023 17:43:04 +0000 (19:43 +0200)
src/tm-threads.c

index 7bc1172a42d66b13b15e3c8e283376a69b915a2e..63bf3be19db4eed8127f41fc98d138d6514647e0 100644 (file)
@@ -1671,7 +1671,8 @@ 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() is %" PRId32, rc);
+        FatalError("Unable to create thread with pthread_create(): retval %d: %s", rc,
+                strerror(errno));
     }
 
 #if DEBUG && HAVE_PTHREAD_GETATTR_NP