On process exit, audit the return value of the process, and commit the

record immediately, as this system call never returns.

Obtained from:	TrustedBSD Project
This commit is contained in:
Robert Watson 2006-02-05 21:08:25 +00:00
parent 6e8525ce84
commit 00c28d9678

View File

@ -183,6 +183,17 @@ exit1(struct thread *td, int rv)
PROC_UNLOCK(p);
#ifdef AUDIT
/*
* The Sun BSM exit token contains two components: an exit status as
* passed to exit(), and a return value to indicate what sort of exit
* it was. The exit status is WEXITSTATUS(rv), but it's not clear
* what the return value is.
*/
AUDIT_ARG(exit, WEXITSTATUS(rv), 0);
AUDIT_SYSCALL_EXIT(0, td);
#endif
/* Are we a task leader? */
if (p == p->p_leader) {
mtx_lock(&ppeers_lock);