csignal header file declared the function raise() to handle a particular signal. Signal learns some unusual behavior in a program, and calls the signal handler. It is implemented to check if the default handler will get called or it will be ignored.
int raise ( int signal_ )
Parameter: The function accepts a single parameter sig which specifies the signal which is artificially raised. It can take any of the 6 C standard signals.
Defined Signal Types
Return Value: It return a nonzero value with no error in signal else it returns zero. The function returns different nonzero elements with different defined signals.
Below programs illustrate the above method:
Before called Signal = 0 After called Signal = 6
Before called Signal = 0 After called Signal = 2
Before called Signal = 0 After called Signal = 15
Before called Signal = 0 After called Signal = 11
Before called Signal = 0 After called Signal = 8
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- log() function in C++
- div() function in C++
- exp() function C++
- fma() function in C++
- arc function in C
- wctrans() function in C/C++
- wmemcpy() function in C/C++
- strnset() function in C
- regex_iterator() function in C++ STL
- valarray abs() function in C++
- valarray sin() function in C++
- fegetenv() function in C/C++
- valarray exp() function in C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.