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
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 signal.h (Unix supplied). This function library defines a lot of functions that are very handy. (I am using sigaction function).
Here's a link to the header file definition.
http://www.opengroup.org/onlinepubs/.../signal.h.html
Cheers!
Kalayama
[COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"