From 6b66414ba0d5212ca4d29f29216df6d649cf9fe9 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 8 Nov 2026 22:16:23 +0100 Subject: Panic when not able to start the accesslist workers. --- src/ot_accesslist.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ot_accesslist.c b/src/ot_accesslist.c index 487597e..fdf631e 100644 --- a/src/ot_accesslist.c +++ b/src/ot_accesslist.c @@ -413,12 +413,13 @@ void accesslist_init(void) { /* Everything that consults the list starts after this returns */ accesslist_readfile(); - pthread_create(&thread_id, NULL, accesslist_worker, NULL); + if (pthread_create(&thread_id, NULL, accesslist_worker, NULL)) + exerr("Cannot create accesslist worker thread."); #ifdef WANT_DYNAMIC_ACCESSLIST - if (g_accesslist_pipe_add) - pthread_create(&thread_adder_id, NULL, accesslist_adder_worker, NULL); - if (g_accesslist_pipe_delete) - pthread_create(&thread_deleter_id, NULL, accesslist_deleter_worker, NULL); + if (g_accesslist_pipe_add && pthread_create(&thread_adder_id, NULL, accesslist_adder_worker, NULL)) + exerr("Cannot create accesslist adder thread."); + if (g_accesslist_pipe_delete && pthread_create(&thread_deleter_id, NULL, accesslist_deleter_worker, NULL)) + exerr("Cannot create accesslist deleter thread."); #endif } -- cgit v1.3