kern_exit.c (17768) | kern_exit.c (18277) |
---|---|
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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 | 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. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)kern_exit.c 8.7 (Berkeley) 2/12/94 |
39 * $Id: kern_exit.c,v 1.37 1996/08/20 07:17:47 smpatel Exp $ | 39 * $Id: kern_exit.c,v 1.38 1996/08/22 03:50:15 julian Exp $ |
40 */ 41 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> 47#include <sys/sysent.h> --- 41 unchanged lines hidden (view full) --- 89} *ele_p; 90 91static ele_p exit_list; 92 93/* 94 * exit -- 95 * Death of process. 96 */ | 40 */ 41 42#include "opt_ktrace.h" 43 44#include <sys/param.h> 45#include <sys/systm.h> 46#include <sys/sysproto.h> 47#include <sys/sysent.h> --- 41 unchanged lines hidden (view full) --- 89} *ele_p; 90 91static ele_p exit_list; 92 93/* 94 * exit -- 95 * Death of process. 96 */ |
97__dead void | 97void |
98exit(p, uap, retval) 99 struct proc *p; 100 struct rexit_args /* { 101 int rval; 102 } */ *uap; 103 int *retval; 104{ 105 106 exit1(p, W_EXITCODE(uap->rval, 0)); 107 /* NOTREACHED */ 108} 109 110/* 111 * Exit: deallocate address space and other resources, change proc state 112 * to zombie, and unlink proc from allproc and parent's lists. Save exit 113 * status and rusage for wait(). Check for child processes and orphan them. 114 */ | 98exit(p, uap, retval) 99 struct proc *p; 100 struct rexit_args /* { 101 int rval; 102 } */ *uap; 103 int *retval; 104{ 105 106 exit1(p, W_EXITCODE(uap->rval, 0)); 107 /* NOTREACHED */ 108} 109 110/* 111 * Exit: deallocate address space and other resources, change proc state 112 * to zombie, and unlink proc from allproc and parent's lists. Save exit 113 * status and rusage for wait(). Check for child processes and orphan them. 114 */ |
115__dead void | 115void |
116exit1(p, rv) 117 register struct proc *p; 118 int rv; 119{ 120 register struct proc *q, *nq; 121 register struct vmspace *vm; 122 ele_p ep = exit_list; 123 --- 433 unchanged lines hidden --- | 116exit1(p, rv) 117 register struct proc *p; 118 int rv; 119{ 120 register struct proc *q, *nq; 121 register struct vmspace *vm; 122 ele_p ep = exit_list; 123 --- 433 unchanged lines hidden --- |