SCCS-vsn: sys/kern/kern_exit.c 7.42
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_exit.c 7.41 (Berkeley) %G%
+ * @(#)kern_exit.c 7.42 (Berkeley) %G%
{
register struct proc *q, *nq;
register struct proc **pp;
{
register struct proc *q, *nq;
register struct proc **pp;
+ register struct vmspace *vm;
fdfree(p);
/* The next two chunks should probably be moved to vmspace_exit. */
fdfree(p);
/* The next two chunks should probably be moved to vmspace_exit. */
- if (p->p_vmspace->vm_shm)
* Can't free the entire vmspace as the kernel stack
* may be mapped within that space also.
*/
* Can't free the entire vmspace as the kernel stack
* may be mapped within that space also.
*/
- if (p->p_vmspace->vm_refcnt == 1)
- (void) vm_map_remove(&p->p_vmspace->vm_map, VM_MIN_ADDRESS,
+ if (vm->vm_refcnt == 1)
+ (void) vm_map_remove(&vm->vm_map, VM_MIN_ADDRESS,
VM_MAXUSER_ADDRESS);
if (p->p_pid == 1)
VM_MAXUSER_ADDRESS);
if (p->p_pid == 1)