diff options
author | trasz <trasz@FreeBSD.org> | 2011-03-29 17:47:25 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2011-03-29 17:47:25 +0000 |
commit | b8d3e8755df2ce0e93cf3b2ab68e0c4275c5565f (patch) | |
tree | 304753d7f5287660a242996801bd5664ee945d3a /sys/kern/kern_exit.c | |
parent | 056d03857b74836195225ca4b0216f0d197477b7 (diff) | |
download | FreeBSD-src-b8d3e8755df2ce0e93cf3b2ab68e0c4275c5565f.zip FreeBSD-src-b8d3e8755df2ce0e93cf3b2ab68e0c4275c5565f.tar.gz |
Add racct. It's an API to keep per-process, per-jail, per-loginclass
and per-loginclass resource accounting information, to be used by the new
resource limits code. It's connected to the build, but the code that
actually calls the new functions will come later.
Sponsored by: The FreeBSD Foundation
Reviewed by: kib (earlier version)
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index e95ac8f..01d6b75 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include <sys/wait.h> #include <sys/vmmeter.h> #include <sys/vnode.h> +#include <sys/racct.h> #include <sys/resourcevar.h> #include <sys/sbuf.h> #include <sys/signalvar.h> @@ -741,6 +742,11 @@ proc_reap(struct thread *td, struct proc *p, int *status, int options, (void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0); /* + * Destroy resource accounting information associated with the process. + */ + racct_proc_exit(p); + + /* * Free credentials, arguments, and sigacts. */ crfree(p->p_ucred); |