-
SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler)
-
{
-
struct k_sigaction new_sa, old_sa;
-
int ret;
-
-
new_sa.sa.sa_handler = handler;
-
new_sa.sa.sa_flags = SA_ONESHOT | SA_NOMASK;
-
sigemptyset(&new_sa.sa.sa_mask);
-
-
ret = do_sigaction(sig, &new_sa, &old_sa);
-
-
return ret ? ret : (unsigned long)old_sa.sa.sa_handler;
-
}
#define SA_NOMASK SA_NODEFER
至于sysv_signal