Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_sig.c
| Show First 20 Lines • Show All 2,309 Lines • ▼ Show 20 Lines | tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) | ||||
| if (p->p_state == PRS_ZOMBIE) { | if (p->p_state == PRS_ZOMBIE) { | ||||
| if (ksi != NULL && (ksi->ksi_flags & KSI_INS) != 0) | if (ksi != NULL && (ksi->ksi_flags & KSI_INS) != 0) | ||||
| ksiginfo_tryfree(ksi); | ksiginfo_tryfree(ksi); | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| ps = p->p_sigacts; | ps = p->p_sigacts; | ||||
| KNOTE_LOCKED(p->p_klist, NOTE_SIGNAL | sig); | KNOTE_LOCKED(p->p_klist, NOTE_SIGNAL | sig); | ||||
| procdesc_jobstate(p); | |||||
| prop = sigprop(sig); | prop = sigprop(sig); | ||||
| if (td == NULL) { | if (td == NULL) { | ||||
| td = sigtd(p, sig, false); | td = sigtd(p, sig, false); | ||||
| sigqueue = &p->p_sigqueue; | sigqueue = &p->p_sigqueue; | ||||
| } else | } else | ||||
| sigqueue = &td->td_sigqueue; | sigqueue = &td->td_sigqueue; | ||||
| ▲ Show 20 Lines • Show All 1,351 Lines • ▼ Show 20 Lines | childproc_jobstate(struct proc *p, int reason, int sig) | ||||
| /* | /* | ||||
| * Wake up parent sleeping in kern_wait(), also send | * Wake up parent sleeping in kern_wait(), also send | ||||
| * SIGCHLD to parent, but SIGCHLD does not guarantee | * SIGCHLD to parent, but SIGCHLD does not guarantee | ||||
| * that parent will awake, because parent may masked | * that parent will awake, because parent may masked | ||||
| * the signal. | * the signal. | ||||
| */ | */ | ||||
| p->p_pptr->p_flag |= P_STATCHILD; | p->p_pptr->p_flag |= P_STATCHILD; | ||||
| wakeup(p->p_pptr); | wakeup(p->p_pptr); | ||||
| procdesc_jobstate(p); | |||||
| ps = p->p_pptr->p_sigacts; | ps = p->p_pptr->p_sigacts; | ||||
| mtx_lock(&ps->ps_mtx); | mtx_lock(&ps->ps_mtx); | ||||
| if ((ps->ps_flag & PS_NOCLDSTOP) == 0) { | if ((ps->ps_flag & PS_NOCLDSTOP) == 0) { | ||||
| mtx_unlock(&ps->ps_mtx); | mtx_unlock(&ps->ps_mtx); | ||||
| sigparent(p, reason, sig); | sigparent(p, reason, sig); | ||||
| } else | } else | ||||
| mtx_unlock(&ps->ps_mtx); | mtx_unlock(&ps->ps_mtx); | ||||
| ▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines | |||||