MISRA C++:2023 Rule 21.10.3
The facilities provided by the standard header file
<csignal>
shall not be used
Since R2024b
Description
Rule Definition
The facilities provided by the standard header file
<csignal>
shall not be used.
Rationale
Signal handling functions such as signal()
and other function
provided by <csignal>
can lead to undefined and
implementation-specific behavior. Signal handlers are limited in what they can safely do and
the behavior of signals can vary between different operating systems.
Avoid using the facilities provided by the header <csignal>
including the facilities provided by <signal.h>
.
Polyspace Implementation
Polyspace® reports a violation on any use of the functions provided by
<csignal>
, such as signal()
.
Polyspace does not report a violation when you call signal()
with a
value of SIG_IGN
as the second argument because this can be used to
disable one or more signals.
Troubleshooting
If you expect a rule violation but Polyspace does not report it, see Diagnose Why Coding Standard Violations Do Not Appear as Expected.
Examples
Check Information
Group: Language support library |
Category: Required |
Version History
Introduced in R2024b