﻿# V2599\. MISRA\. The standard signal handling functions should not be used\.

This diagnostic rule is based on the software development guidelines developed by [MISRA](https://www.misra.org.uk/) \(Motor Industry Software Reliability Association\)\.

Standard library functions of the header files <signal\.h\> / <csignal\> may be dangerous\. Their behavior depends on the implementation, and their use may cause undefined behavior\.

The use of signal handlers in a multithreaded program, for example, could be one of the reasons for undefined behavior\. Other reasons you will find [here](https://en.cppreference.com/w/c/program/signal)\.

The analyzer issues this warning when it detects the following functions:

* signal;
* raise\.

Here is an example of code triggering this warning:

```cpp
#include <signal.h>

void handler(int sig) { .... }

void foo()
{
  signal(SIGINT, handler);
}
```