From 8dc12f5f14b9676df068ba28af87a240b32f0dee Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 1 Aug 2023 14:00:54 +0200 Subject: [PATCH] threads: improve spawn failure error reporting --- src/tm-threads.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tm-threads.c b/src/tm-threads.c index 7bc1172a42..63bf3be19d 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -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