Lines Matching full:signal
38 TEST IDENTIFIER : kill02 Sending a signal to processes with the same process group ID.
50 1. Sending a signal to pid of zero sends to all processes whose process
53 2. Sending a signal to pid of zero does not send to processes in another process group.
58 kiltcs02 1 PASS The signal was sent to all processes in the process group.
59 kiltcs02 2 PASS The signal was not sent to selective processes that were not in the process group.
62 kiltcs02 1 FAIL The signal was not sent to all processes in the process group.
63 kiltcs02 2 FAIL The signal was sent to a process that was not in the process group.
67 kiltcs02 # BROK Setting to catch unexpected signal %d failed. Errno: %d, Error message %s.
68 kiltcs02 # BROK Setting to ignore signal %d failed. Errno: %d, Error message %s.
71 kiltcs02 0 WARN Unexpected signal X was caught.
80 Set up unexpected signal handling.
87 Send the signal SIGUSR1 with pid equal to zero.
89 to process the signal.
91 out if the child was interrupted by the signal and wrote to it.
102 Pause until the signal SIGUSR1 comes in from the parent.
110 Pause until killed by parent because this child shouldn't receive signal SIGUSR1.
115 Pause until the signal SIGUSR1 comes in from the parent.
122 Pause until killed by parent because this child shouldn't receive signal SIGUSR1.
125 Write to the appropriate pipe that the signal SIGUSR1 was caught.
135 #include <signal.h>
142 #define SIG_CAUGHT "2" /*Indicates that the signal SIGUSR1 was caught. */
143 #define SIG_RECEIVED 1 /*Integer value that indicates that the signal SIGUSR1 */
145 #define SIG_NOT_RECD 0 /*Integer value that indicates that the signal SIGUSR1 */
149 #define SLEEP_TIME 10 /*Amount of time the children get to catch the signal */
153 /*parents signal. */
156 #define CHILD_SIG(VAR) (VAR & 0377) /*Signal value from the termination of child. */
185 void notify_timeout(); /*Signal handler that the parent enters if it times out */
193 /*they have caught signal SIGUSR1. */
292 * get set up. Then sends the signal and checks the outcome.
297 * Set to catch the alarm signal SIGALRM.
299 if (signal(SIGALRM, notify_timeout) == SIG_ERR) {
359 * catch the signal.
364 * The signal was sent above and time has run out for child response,
391 * Check the processes that were supposed to get the signal.
397 * the signal did receive the signal.
400 "The signal was sent to all processes in the process group.");
401 } else { /*Process A didn't receive the signal. */
403 "Process A did not receive the signal.");
406 } else { /*Process 1 didn't receive the signal. */
407 tst_resm(TFAIL, "Process 1 did not receive the signal.");
411 * Check the processes that were not supposed to get the signal.
416 * Both processes, 2 and B did not receive the signal.
419 "The signal was not sent to selective processes that were not in the process group.");
420 } else { /*Process B received the signal. */
421 tst_resm(TFAIL, "Process B received the signal.");
426 else { /*Process 2 received the signal. */
428 tst_resm(TFAIL, "Process 2 received the signal.");
446 if (signal(SIGUSR1, usr1_rout) == SIG_ERR) {
448 "Could not set to catch the childrens signal.");
512 if (signal(SIGUSR2, chld1_kill) == SIG_ERR) {
514 "Could not set to catch the parents signal.");
521 * Set to catch the alarm signal SIGALRM.
523 if (signal(SIGALRM, notify_timeout) == SIG_ERR) {
564 * Pause until the signal SIGUSR1 or SIGUSR2 is sent from the parent.
569 * Pause until signal SIGUSR2 is sent from the parent.
579 * This is the routine for child 2, which should not receive the parents signal.
594 if (signal(SIGUSR1, usr1_rout) == SIG_ERR) {
596 "Could not set to catch the parents signal.");
611 * This is the routine for child A, which should receive the parents signal.
634 /* Setup the signal handler again */
635 if (signal(SIGUSR1, usr1_rout) == SIG_ERR) {
637 "Could not set to catch the childrens signal.");
647 * This is the routine for child B, which should not receive the parents signal.
676 /* Setup the signal handler again */
677 if (signal(SIGUSR1, usr1_rout) == SIG_ERR) {
679 "Could not set to catch the childrens signal.");
689 * This routine sets up the interprocess communication pipes, signal handling,
705 * SIGUSR1 is set to be ignored because this is the signal we are using for
711 if (signal(SIGUSR1, SIG_IGN) == SIG_ERR) {
713 "signal(SIGUSR1, SIG_IGN) failed");
716 if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
718 "signal(SIGCHLD, SIG_IGN) failed");
769 "Writing signal catching status failed in child 1.");
774 "Writing signal catching status failed in child 2.");
779 "Writing signal catching status failed in child A.");
784 "Writing signal catching status failed in child B.");