kern_exit.c (183911) | kern_exit.c (185435) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 21 unchanged lines hidden (view full) --- 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/kern_exit.c 183911 2008-10-15 06:31:37Z davidxu $"); | 38__FBSDID("$FreeBSD: head/sys/kern/kern_exit.c 185435 2008-11-29 14:32:14Z bz $"); |
39 40#include "opt_compat.h" 41#include "opt_kdtrace.h" 42#include "opt_ktrace.h" 43#include "opt_mac.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> 47#include <sys/sysproto.h> 48#include <sys/eventhandler.h> 49#include <sys/kernel.h> 50#include <sys/malloc.h> 51#include <sys/lock.h> 52#include <sys/mutex.h> 53#include <sys/proc.h> 54#include <sys/pioctl.h> | 39 40#include "opt_compat.h" 41#include "opt_kdtrace.h" 42#include "opt_ktrace.h" 43#include "opt_mac.h" 44 45#include <sys/param.h> 46#include <sys/systm.h> 47#include <sys/sysproto.h> 48#include <sys/eventhandler.h> 49#include <sys/kernel.h> 50#include <sys/malloc.h> 51#include <sys/lock.h> 52#include <sys/mutex.h> 53#include <sys/proc.h> 54#include <sys/pioctl.h> |
55#include <sys/jail.h> |
|
55#include <sys/tty.h> 56#include <sys/wait.h> 57#include <sys/vmmeter.h> 58#include <sys/vnode.h> 59#include <sys/resourcevar.h> 60#include <sys/sbuf.h> 61#include <sys/signalvar.h> 62#include <sys/sched.h> --- 385 unchanged lines hidden (view full) --- 448 PROC_UNLOCK(q); 449 } 450 451 /* Save exit status. */ 452 PROC_LOCK(p); 453 p->p_xstat = rv; 454 p->p_xthread = td; 455 | 56#include <sys/tty.h> 57#include <sys/wait.h> 58#include <sys/vmmeter.h> 59#include <sys/vnode.h> 60#include <sys/resourcevar.h> 61#include <sys/sbuf.h> 62#include <sys/signalvar.h> 63#include <sys/sched.h> --- 385 unchanged lines hidden (view full) --- 449 PROC_UNLOCK(q); 450 } 451 452 /* Save exit status. */ 453 PROC_LOCK(p); 454 p->p_xstat = rv; 455 p->p_xthread = td; 456 |
457 /* In case we are jailed tell the prison that we are gone. */ 458 if (jailed(p->p_ucred)) 459 prison_proc_free(p->p_ucred->cr_prison); 460 |
|
456#ifdef KDTRACE_HOOKS 457 /* 458 * Tell the DTrace fasttrap provider about the exit if it 459 * has declared an interest. 460 */ 461 if (dtrace_fasttrap_exit) 462 dtrace_fasttrap_exit(p); 463#endif --- 451 unchanged lines hidden --- | 461#ifdef KDTRACE_HOOKS 462 /* 463 * Tell the DTrace fasttrap provider about the exit if it 464 * has declared an interest. 465 */ 466 if (dtrace_fasttrap_exit) 467 dtrace_fasttrap_exit(p); 468#endif --- 451 unchanged lines hidden --- |