Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sig.c
Show First 20 Lines • Show All 2,933 Lines • ▼ Show 20 Lines | sigprocess(struct thread *td, int sig) | ||||||||
if (SIGISMEMBER(ps->ps_sigignore, sig) && | if (SIGISMEMBER(ps->ps_sigignore, sig) && | ||||||||
(p->p_flag & P_TRACED) == 0 && | (p->p_flag & P_TRACED) == 0 && | ||||||||
(td->td_flags & TDF_SIGWAIT) == 0) { | (td->td_flags & TDF_SIGWAIT) == 0) { | ||||||||
return (SIGSTATUS_IGNORE); | return (SIGSTATUS_IGNORE); | ||||||||
} | } | ||||||||
if ((p->p_flag & (P_TRACED | P_PPTRACE)) == P_TRACED) { | if ((p->p_flag & (P_TRACED | P_PPTRACE)) == P_TRACED) { | ||||||||
/* | /* | ||||||||
* If traced, always stop. | * If traced, always stop. | ||||||||
markjUnsubmitted Done Inline Actions
markj: | |||||||||
* Remove old signal from queue before the stop. | * Remove old signal from queue before the stop. | ||||||||
* XXX shrug off debugger, it causes siginfo to | * XXX shrug off debugger, it causes siginfo to | ||||||||
* be thrown away. | * be thrown away. | ||||||||
*/ | */ | ||||||||
queue = &td->td_sigqueue; | queue = &td->td_sigqueue; | ||||||||
ksiginfo_init(&ksi); | ksiginfo_init(&ksi); | ||||||||
if (sigqueue_get(queue, sig, &ksi) == 0) { | if (sigqueue_get(queue, sig, &ksi) == 0) { | ||||||||
queue = &p->p_sigqueue; | queue = &p->p_sigqueue; | ||||||||
▲ Show 20 Lines • Show All 450 Lines • ▼ Show 20 Lines | |||||||||
* does not return. | * does not return. | ||||||||
*/ | */ | ||||||||
void | void | ||||||||
sigexit(struct thread *td, int sig) | sigexit(struct thread *td, int sig) | ||||||||
{ | { | ||||||||
struct proc *p = td->td_proc; | struct proc *p = td->td_proc; | ||||||||
PROC_LOCK_ASSERT(p, MA_OWNED); | PROC_LOCK_ASSERT(p, MA_OWNED); | ||||||||
p->p_flag2 |= P2_WEXIT; | |||||||||
p->p_acflag |= AXSIG; | p->p_acflag |= AXSIG; | ||||||||
/* | /* | ||||||||
* We must be single-threading to generate a core dump. This | * We must be single-threading to generate a core dump. This | ||||||||
* ensures that the registers in the core file are up-to-date. | * ensures that the registers in the core file are up-to-date. | ||||||||
* Also, the ELF dump handler assumes that the thread list doesn't | * Also, the ELF dump handler assumes that the thread list doesn't | ||||||||
* change out from under it. | * change out from under it. | ||||||||
* | * | ||||||||
* XXX If another thread attempts to single-thread before us | * XXX If another thread attempts to single-thread before us | ||||||||
▲ Show 20 Lines • Show All 966 Lines • Show Last 20 Lines |