Main Content
Signal call in multithreaded program
Program with multiple threads uses signal
function
Description
This checker is deactivated in a default Polyspace® as You Code analysis. See Checkers Deactivated in Polyspace as You Code Analysis (Polyspace Access).
This defect occurs when you use
the signal()
function in a program with multiple threads.
Risk
According to the C11 standard (Section 7.14.1.1), use of the signal()
function in a multithreaded program is undefined behavior.
Fix
Depending on your intent, use other ways to perform an asynchronous action on a specific thread.
Examples
Result Information
Group: Concurrency |
Language: C | C++ |
Default: Off |
Command-Line Syntax:
SIGNAL_USE_IN_MULTITHREADED_PROGRAM |
Impact: Low |
Version History
Introduced in R2018b
See Also
Function called from
signal handler not asynchronous-safe
| Signal call from within
signal handler
| MISRA C:2012 Rule 21.5
| Find defects (-checkers)
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)