Lines Matching refs:sig
84 sigaction_handler (int sig) in sigaction_handler() argument
90 if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler) in sigaction_handler()
93 if (sig == SIGABRT) in sigaction_handler()
106 handler = action_array[sig].sa_handler; in sigaction_handler()
107 if ((action_array[sig].sa_flags & SA_RESETHAND) == 0) in sigaction_handler()
108 signal (sig, sigaction_handler); in sigaction_handler()
110 action_array[sig].sa_handler = NULL; in sigaction_handler()
113 mask = action_array[sig].sa_mask; in sigaction_handler()
114 if ((action_array[sig].sa_flags & SA_NODEFER) == 0) in sigaction_handler()
115 sigaddset (&mask, sig); in sigaction_handler()
120 handler (sig); in sigaction_handler()
131 sigaction (int sig, const struct sigaction *restrict act, in sigaction() argument
138 if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP in sigaction()
146 if (sig == SIGABRT_COMPAT) in sigaction()
147 sig = SIGABRT; in sigaction()
164 if (action_array[sig].sa_handler) in sigaction()
165 *oact = action_array[sig]; in sigaction()
170 oact->sa_handler = signal (sig, SIG_DFL); in sigaction()
173 signal (sig, oact->sa_handler); in sigaction()
185 if (signal (sig, act->sa_handler) == SIG_ERR) in sigaction()
187 action_array[sig].sa_handler = NULL; in sigaction()
191 if (signal (sig, sigaction_handler) == SIG_ERR) in sigaction()
193 action_array[sig] = *act; in sigaction()