• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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