Hi , I have a parent that catch the SIGTERM and SIGALRM signals. ... signal (SIGTERM, die); signal (SIGALRM, dummy); ... for (min = 0; min < 15 && not_done; min++) { alarm ((unsigned int) 60); /* wait for 1 minute */ pid = wait (&status); /* Wait for a process to end */ alarm ((unsigned int) 0); /* Reset alarm */ .... }
and a child that use the same signal catch function. ... signal (SIGTERM, die); ... Here is the die fucntion. #include...... void die(); void die () { signal (SIGTERM, (void (*)())die); printf("child receives SIGTERM signal\n"); return; } void s_down(); void s_down () { extern BOOLEAN l_down; signal (SIGALRM, (void (*)())s_down); l_down = TRUE; printf("child receive SIGALRM signal\n"); return; } When I send a sigterm signal only the parent display "parent receives SIGTERM signal" and stack here. If I give a kill -9 child pid the parent displays "Normal Termination"and than Killed. Why the parent stack in wait() and child do not receive any signal? TIA. Bubulac Tatiana. _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list