Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_exit.c
| Show First 20 Lines • Show All 1,049 Lines • ▼ Show 20 Lines | proc_reap(struct thread *td, struct proc *p, int *status, int options) | ||||
| leavepgrp(p); | leavepgrp(p); | ||||
| if (p->p_procdesc != NULL) | if (p->p_procdesc != NULL) | ||||
| procdesc_reap(p); | procdesc_reap(p); | ||||
| else | else | ||||
| proc_id_clear(PROC_ID_PID, p->p_pid); | proc_id_clear(PROC_ID_PID, p->p_pid); | ||||
| sx_xunlock(&proctree_lock); | sx_xunlock(&proctree_lock); | ||||
| PROC_LOCK(p); | PROC_LOCK(p); | ||||
| KNOTE_LOCKED(p->p_klist, NOTE_REAP); | |||||
| knlist_detach(p->p_klist); | knlist_detach(p->p_klist); | ||||
| p->p_klist = NULL; | p->p_klist = NULL; | ||||
| PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
| /* | /* | ||||
| * Removal from allproc list and process group list paired with | * Removal from allproc list and process group list paired with | ||||
| * PROC_LOCK which was executed during that time should guarantee | * PROC_LOCK which was executed during that time should guarantee | ||||
| * nothing can reach this process anymore. As such further locking | * nothing can reach this process anymore. As such further locking | ||||
| ▲ Show 20 Lines • Show All 611 Lines • Show Last 20 Lines | |||||