Lines Matching refs:sig

127 static void timeout(int sig);
129 static void handler(int sig);
136 int choose_sig(int sig);
244 int sig; /* current signal number */ in parent() local
266 for (sig = 1; sig < NUMSIGS; sig++) { in parent()
267 if (choose_sig(sig)) { in parent()
268 if (kill(pid, sig) < 0) { in parent()
273 pid, sig, pid); in parent()
277 pid, sig, pid); in parent()
281 sig); in parent()
297 if ((sig = CHILD_SIG(term_stat)) != 0) in parent()
300 sig); in parent()
315 for (sig = 1; sig < NUMSIGS; sig++) { in parent()
316 printf("array[%d] = %d\n", sig, array[sig]); in parent()
320 for (sig = 1; sig < NUMSIGS; sig++) { in parent()
321 if (choose_sig(sig)) { in parent()
322 if (array[sig] != 1) { in parent()
326 sig, array[sig]); in parent()
382 int sig; /* signal value */ in child() local
404 for (sig = 1; sig < NUMSIGS; sig++) { in child()
405 if (choose_sig(sig)) { in child()
406 if ((rv = sighold(sig)) != 0) { in child()
472 for (sig = 1; sig < NUMSIGS; sig++) { in child()
473 if (choose_sig(sig)) { in child()
479 printf("child: releasing sig %d...\n", sig); in child()
481 if ((rv = sigrelse(sig)) != 0) { in child()
533 int sig; in setup_sigs() local
536 for (sig = 1; sig < NUMSIGS; sig++) { in setup_sigs()
537 if (choose_sig(sig)) { in setup_sigs()
538 if (signal(sig, handler) == SIG_ERR) { in setup_sigs()
542 sig, errno, strerror(errno)); in setup_sigs()
561 static void handler(int sig) in handler() argument
566 printf("child: handler phase%d: caught signal %d.\n", phase, sig); in handler()
582 ++sig_array[sig]; in handler()
685 static void timeout(int sig) in timeout() argument
727 int choose_sig(int sig) in choose_sig() argument
729 switch (sig) { in choose_sig()