From: Willy Tarreau Date: Mon, 27 Jun 2022 14:23:44 +0000 (+0200) Subject: MINOR: thread: use ltid_bit in ha_tkillall() X-Git-Tag: v2.7-dev2~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6cf64bb5ed0b87ca3db978a5dfcc3dd066c2865;p=thirdparty%2Fhaproxy.git MINOR: thread: use ltid_bit in ha_tkillall() Since commit cc7a11ee3 ("MINOR: threads: set the tid, ltid and their bit in thread_cfg") we ought not use (1UL << thr) to get the group mask for thread , but (ha_thread_info[thr].ltid_bit). ha_tkillall() needs this. --- diff --git a/src/thread.c b/src/thread.c index d895bbcdab..6f81f96a13 100644 --- a/src/thread.c +++ b/src/thread.c @@ -315,7 +315,7 @@ void ha_tkillall(int sig) unsigned int thr; for (thr = 0; thr < global.nbthread; thr++) { - if (!(all_threads_mask & (1UL << thr))) + if (!(tg->threads_enabled & ha_thread_info[thr].ltid_bit)) continue; if (thr == tid) continue;