Lines Matching defs:sig
152 static sigactq_t *__sig_find_action(int sig)
157 if (g_sig_arr[i].signo == sig) {
170 static int __sig_cannot_catche(int sig, sa_sighandler_t handler)
175 if (sig == sig_default_action[i].singNo) {
179 /* This sig can be catch and ignore return false */
233 static int __sig_dfl_opr(int sig, sigactq_t *sigact, const sigaction_t *act)
237 def_handler = __sig_find_def_action(sig);
248 static int __sig_action_opr(int sig, const sigaction_t *act, sigaction_t *oact)
256 if (sig < SIGHUP || sig > (_NSIG - 1)) return -EINVAL;
259 /* Skip sig that can not be catched */
260 if (__sig_cannot_catche(sig, handler)) return -EINVAL;
263 sigact = __sig_find_action(sig);
271 ret = __sig_dfl_opr(sig, sigact, act);
299 int __libc_sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old)
306 a_or_l(handler_set + (sig - 1) / (8 * sizeof(long)),
307 1UL<<(sig - 1) % (8 * sizeof(long)));
336 if (sig == SIGSYS) {
337 return syscall(SYS_rt_sigaction, sig, sa ? &ksa : 0, old?&ksa_old:0, _NSIG / 8);
339 r = __sig_action_opr(sig, (const sigaction_t*)sa ? &ksa : 0, (sigaction_t*)old?&ksa_old:0);
349 int __sigaction(int sig, const struct sigaction *restrict sa, struct sigaction *restrict old)
353 if (sig-32U < 3 || sig-1U >= _NSIG-1) {
361 if (sig == SIGABRT) {
365 int r = __libc_sigaction(sig, sa, old);
366 if (sig == SIGABRT) {