]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLENAUP: wdt: use ha_tkill() instead of accessing pthread directly
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Oct 2021 19:43:38 +0000 (21:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Oct 2021 23:41:14 +0000 (01:41 +0200)
Instead of calling pthread_kill() directly on the pthread_t let's
call ha_tkill() which does the same by itself. This will help isolate
pthread_t.

src/wdt.c

index c42c4f7a07bfd7228d8cf896d59bdafa304993b2..f1aa3ec8686150ad411c533bc52a6014bd8af43a 100644 (file)
--- a/src/wdt.c
+++ b/src/wdt.c
@@ -115,7 +115,7 @@ void wdt_handler(int sig, siginfo_t *si, void *arg)
         */
 #ifdef USE_THREAD
        if (thr != tid)
-               pthread_kill(ha_thread_info[thr].pthread, sig);
+               ha_tkill(thr, sig);
        else
 #endif
                ha_panic();