Lines Matching defs:sig
26 * $FreeBSD: src/usr.sbin/ppp/sig.c,v 1.18.40.1 2010/12/21 17:10:29 kensmith Exp $
34 #include "sig.h"
50 signal_recorder(int sig)
52 caused[sig - 1]++;
58 * Set up signal_recorder to handle the given sig and record ``fn'' as
64 sig_signal(int sig, sig_type fn)
68 if (sig <= 0 || sig > NSIG) {
72 return signal(sig, fn);
74 Result = handler[sig - 1];
76 signal(sig, fn);
77 handler[sig - 1] = (sig_type) 0;
79 handler[sig - 1] = fn;
80 signal(sig, signal_recorder);
82 caused[sig - 1] = 0;
97 int sig;
108 for (sig = 0; sig < NSIG; sig++)
109 if (caused[sig]) {
110 caused[sig]--;
113 (*handler[sig])(sig + 1);