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++
- exp() function C++
- log() function in C++
- div() function in C++
- arc function in C
- fma() function in C++
- iswdigit() function in C/C++
- putwchar() function in C/C++
- iswupper() function in C/C++
- vwprintf() function in C/C++
- vswscanf() Function in C/C++
- lldiv() function in C++ STL
- ilogb() function in C++ STL
- strtod() function in C/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 email@example.com. 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.