FreeBSD/sys/kern/sys_procdesc.c
/*
 * When a process descriptor is reaped, perhaps as a result of close() or
 * pdwait4(), release the process's reference on the process descriptor.
 */
When a process descriptor is reaped, perhaps as a result of close() or
pdwait4(), release the process's reference on the process descriptor.
When a process descriptor is reaped perhaps as a result of close () or pdwait4 () release the process ' s reference on the process descriptor .
void
procdesc_reap(struct proc *p)
{
	struct procdesc *pd;
	sx_assert(&proctree_lock, SA_XLOCKED);
	KASSERT(p->p_procdesc != NULL, ("procdesc_reap: p_procdesc == NULL"));
	pd = p->p_procdesc;
	pd->pd_proc = NULL;
	p->p_procdesc = NULL;
	procdesc_free(pd);
}
void procdesc_reap ( struct proc * p ) { struct procdesc * pd ; sx_assert ( & proctree_lock , SA_XLOCKED ) ; KASSERT ( p -> p_procdesc != NULL , ( " " ) ) ; pd = p -> p_procdesc ; pd -> pd_proc = NULL ; p -> p_procdesc = NULL ; procdesc_free ( pd ) ; }
When a process descriptor is reaped, perhaps as a result of close() or
 pdwait4(), release the process's reference on the process descriptor.
When a process descriptor is reaped perhaps as a result of close () or pdwait4 () release the process ' s reference on the process descriptor .