Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exit.c
Show First 20 Lines • Show All 1,013 Lines • ▼ Show 20 Lines | proc_to_reap(struct thread *td, struct proc *p, idtype_t idtype, id_t id, | ||||
struct rusage *rup; | struct rusage *rup; | ||||
sx_assert(&proctree_lock, SA_XLOCKED); | sx_assert(&proctree_lock, SA_XLOCKED); | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
switch (idtype) { | switch (idtype) { | ||||
case P_ALL: | case P_ALL: | ||||
if (p->p_procdesc == NULL || | if ((p->p_flag2 & P2_PDFORK) == 0 || | ||||
(p->p_pptr == td->td_proc && | (p->p_pptr == td->td_proc && | ||||
(p->p_flag & P_TRACED) != 0)) { | (p->p_flag & P_TRACED) != 0)) { | ||||
break; | break; | ||||
} | } | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
return (0); | return (0); | ||||
case P_PID: | case P_PID: | ||||
▲ Show 20 Lines • Show All 400 Lines • Show Last 20 Lines |