THe 'signal' function question
Hi,
I hav a question about the 'signal' function in the signal handling library. say i've got
Quote:
signal( SIGINT, signal_handler );
But if the signal_handler function has a parameter. Like a prototype below
Quote:
void signal_handler( int signalValue );
What will signalValue be if i report the signal using 'raise()' ?
What will be passed to the signal handling function?
thnx
Re: THe 'signal' function question
Quote:
Originally posted by Nutshell
What will signalValue be if i report the signal using 'raise()' ?
What will be passed to the signal handling function?
The numeric value of the signal raised. For example SIGINT == 2 and SIGKILL == 9. You can get a complete listing in the header file /usr/include/signal.h