Hi,
Abnormal termination of a process sends a signal to let users know about the problem. But for doing this these must be trapped. What are the functions available in UNIX or features in UNIX for doing signal trapping or handling?
Regards,
Blenda
Printable View
Hi,
Abnormal termination of a process sends a signal to let users know about the problem. But for doing this these must be trapped. What are the functions available in UNIX or features in UNIX for doing signal trapping or handling?
Regards,
Blenda
All signals are defined in header file <signal.h>. I have given below some of the signal functions.
kill ( ) - A system call that send a signal to a process . kill() returns 0 for a successful call, -1 otherwise and sets errno accordingly. So return value is a integer for this call.
raise( ) - sends the signal to the executing program
There are lot more signal handling functions present.
I am using this feature in my current work item. I code in C++ and there is a function library called [B]signal.h[/B] (Unix supplied). This function library defines a lot of functions that are very handy. (I am using [COLOR="Blue"]sigaction[/COLOR] function).
Here's a link to the header file definition.
[URL="http://www.opengroup.org/onlinepubs/7990989775/xsh/signal.h.html"]http://www.opengroup.org/onlinepubs/7990989775/xsh/signal.h.html[/URL]
Cheers!
Kalayama