Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sig.c
Show First 20 Lines • Show All 2,729 Lines • ▼ Show 20 Lines | for (;;) { | ||||
* Decide whether the signal should be returned. | * Decide whether the signal should be returned. | ||||
* Return the signal's number, or fall through | * Return the signal's number, or fall through | ||||
* to clear it from the pending mask. | * to clear it from the pending mask. | ||||
*/ | */ | ||||
switch ((intptr_t)p->p_sigacts->ps_sigact[_SIG_IDX(sig)]) { | switch ((intptr_t)p->p_sigacts->ps_sigact[_SIG_IDX(sig)]) { | ||||
case (intptr_t)SIG_DFL: | case (intptr_t)SIG_DFL: | ||||
/* | /* | ||||
* Don't take default actions on system processes. | * Don't take default actions on system processes, | ||||
* but make sure to allow killing init(8) | |||||
* when rebooting. | |||||
*/ | */ | ||||
if (p->p_pid <= 1) { | if (p->p_pid < 1 || | ||||
(p->p_pid == 1 && rebooting == 0)) { | |||||
#ifdef DIAGNOSTIC | #ifdef DIAGNOSTIC | ||||
/* | /* | ||||
* Are you sure you want to ignore SIGSEGV | * Are you sure you want to ignore SIGSEGV | ||||
* in init? XXX | * in init? XXX | ||||
*/ | */ | ||||
printf("Process (pid %lu) got signal %d\n", | printf("Process (pid %lu) got signal %d\n", | ||||
(u_long)p->p_pid, sig); | (u_long)p->p_pid, sig); | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 809 Lines • Show Last 20 Lines |