mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Do not start threads in detached mode. Joining them may SEGFAULT with libmusl
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -2912,12 +2912,10 @@ void FTL_fork_and_bind_sockets(struct passwd *ent_pw, bool dnsmasq_start)
|
||||
// so they will not listen to real-time signals
|
||||
handle_realtime_signals();
|
||||
|
||||
// We will use the attributes object later to start all threads in
|
||||
// detached mode
|
||||
pthread_attr_t attr;
|
||||
// Initialize thread attributes object with default attribute values
|
||||
// Do NOT detach threads as we want to join them during shutdown with a
|
||||
// fixed timeout to give them time to clean up and finish their work
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
|
||||
// Initialize NTP server
|
||||
|
||||
@@ -616,8 +616,6 @@ int run_arp_scan(const bool scan_all, const bool extreme_mode)
|
||||
pthread_attr_t attr;
|
||||
// Initialize thread attributes object with default attribute values
|
||||
pthread_attr_init(&attr);
|
||||
// Set thread attributes to detached mode
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
|
||||
struct ifaddrs *addrs, *tmp;
|
||||
getifaddrs(&addrs);
|
||||
|
||||
@@ -725,8 +725,6 @@ int run_dhcp_discover(void)
|
||||
pthread_attr_t attr;
|
||||
// Initialize thread attributes object with default attribute values
|
||||
pthread_attr_init(&attr);
|
||||
// Set thread attributes to detached mode
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
|
||||
// Create processing/printfing lock
|
||||
pthread_mutexattr_t lock_attr;
|
||||
|
||||
Reference in New Issue
Block a user