Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_exit.c
Show First 20 Lines • Show All 901 Lines • ▼ Show 20 Lines | proc_reap(struct thread *td, struct proc *p, int *status, int options) | ||||
* Decrement the count of procs running with this uid. | * Decrement the count of procs running with this uid. | ||||
*/ | */ | ||||
(void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0); | (void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0); | ||||
/* | /* | ||||
* Destroy resource accounting information associated with the process. | * Destroy resource accounting information associated with the process. | ||||
*/ | */ | ||||
#ifdef RACCT | #ifdef RACCT | ||||
if (racct_enable) { | |||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
racct_sub(p, RACCT_NPROC, 1); | racct_sub(p, RACCT_NPROC, 1); | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
} | |||||
#endif | #endif | ||||
racct_proc_exit(p); | racct_proc_exit(p); | ||||
/* | /* | ||||
* Free credentials, arguments, and sigacts. | * Free credentials, arguments, and sigacts. | ||||
*/ | */ | ||||
crfree(p->p_ucred); | crfree(p->p_ucred); | ||||
proc_set_cred(p, NULL); | proc_set_cred(p, NULL); | ||||
▲ Show 20 Lines • Show All 424 Lines • Show Last 20 Lines |