/*
- * Copyright (c) 1982, 1986, 1989, 1991 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1982, 1986, 1989, 1991, 1993
+ * The Regents of the University of California. All rights reserved.
*
* %sccs.include.redist.c%
*
- * @(#)kern_exit.c 8.1 (Berkeley) %G%
+ * @(#)kern_exit.c 8.2 (Berkeley) %G%
*/
#include <sys/param.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
+__dead void cpu_exit __P((struct proc *));
+__dead void exit1 __P((struct proc *, int));
+
/*
* exit --
* Death of process.
struct rexit_args {
int rval;
};
+__dead void
exit(p, uap, retval)
struct proc *p;
struct rexit_args *uap;
* to zombie, and unlink proc from allproc and parent's lists. Save exit
* status and rusage for wait(). Check for child processes and orphan them.
*/
+__dead void
exit1(p, rv)
register struct proc *p;
int rv;
}
fixjobc(p, p->p_pgrp, 0);
p->p_rlimit[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
- (void) acct(p);
+ (void)acct_process(p);
#ifdef KTRACE
/*
* release trace file
* our execution (pun intended).
*/
cpu_exit(p);
- /* NOTREACHED */
}
struct wait_args {
#define wait1 wait4
#endif
-/*
- * Wait: check child processes to see if any have exited,
- * stopped under trace, or (optionally) stopped by a signal.
- * Pass back status and deallocate exited child's proc structure.
- */
+int
wait1(q, uap, retval)
register struct proc *q;
register struct wait_args *uap;