This rule is part of MISRA C++:2023.
Usage of this content is governed by Sonar’s terms and conditions. Redistribution is
prohibited.
Rule 21.10.3 - The facilities provided by the standard header file [1] <csignal> shall not be used
[C11] / 7.14.1.1; Undefined 3, 5, 7; Implementation 3, 6; Indeterminate 5
[Koenig] 74
Category: Required
Analysis: Decidable,Single Translation Unit
Amplification
None of the facilities that are specified as being provided by <csignal> shall be used.
Note: this rule also applies to the facilities provided by <signal.h>.
Rationale
The inappropriate use of signal handling can lead to undefined and implementation-defined behaviour.
Note: the C++ Standard states that signal handling behaviour is specified in the related version of ISO 9899 .
Exception
Calls to signal with a value of SIG_IGN as the second (func) parameter may be used to disable one or more
signals. For example:
signal( SIGTERM, SIG_IGN );
Glossary
[1] Header file
A header file is considered to be any file that is included during preprocessing (for example via the #include directive),
regardless of its name or suffix.
Copyright The MISRA Consortium Limited © 2023