1.. title:: clang-tidy - bugprone-signal-handler 2 3bugprone-signal-handler 4======================= 5 6Finds functions registered as signal handlers that call non asynchronous-safe 7functions. Any function that cannot be determined to be an asynchronous-safe 8function call is assumed to be non-asynchronous-safe by the checker, 9including user functions for which only the declaration is visible. 10User function calls with visible definition are checked recursively. 11The check handles only C code. 12 13The minimal list of asynchronous-safe system functions is: 14``abort()``, ``_Exit()``, ``quick_exit()`` and ``signal()`` 15(for ``signal`` there are additional conditions that are not checked). 16The check accepts only these calls as asynchronous-safe. 17 18This check corresponds to the CERT C Coding Standard rule 19`SIG30-C. Call only asynchronous-safe functions within signal handlers 20<https://www.securecoding.cert.org/confluence/display/c/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers>`_. 21