What happens during this signal handling program?
void main ( ) { int x; signal (SIGUSR1, f); x= fork ( ); if (x == -1) exit (1); if (x != 0) { kill (x, SIGUSR1) ; sleep (2); exit (0); } } void f ( ) { printf ("signal received"); exit (0); } I think that the program above asks the system to launch the f function ( which displays "signal received" ) when the SIGUSR1 signal is received by the parent process. but I'm not sure about that, please feel free to correct or to give more details. Thank for the help ! Grijesh Chauhan There are some mistakes in your code: Avoid calling printf( ) function in signal handler. SIGNAL(7) manual provides a