xref: /llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/bad-signal-to-kill-thread.rst (revision 3cf574da407b9be01cc86f0ad2902c5d2ff8f078)
1.. title:: clang-tidy - bugprone-bad-signal-to-kill-thread
2
3bugprone-bad-signal-to-kill-thread
4==================================
5
6Finds ``pthread_kill`` function calls when a thread is terminated by
7raising ``SIGTERM`` signal and the signal kills the entire process, not
8just the individual thread. Use any signal except ``SIGTERM``.
9
10.. code-block:: c++
11
12    pthread_kill(thread, SIGTERM);
13
14This check corresponds to the CERT C Coding Standard rule
15`POS44-C. Do not use signals to terminate threads
16<https://wiki.sei.cmu.edu/confluence/display/c/POS44-C.+Do+not+use+signals+to+terminate+threads>`_.
17
18`cert-pos44-c` redirects here as an alias of this check.
19