summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1999-07-15 14:11:06 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1999-07-15 14:11:06 +0000
commit7bdb8bc6dd617efd36012f956c9992b1cfa8e85c (patch)
tree54d1ac29efc0e963f5b33d4f5b1295cdb09c6dfa /sys/kern/kern_exit.c
parent388ce0bc8d4ed3c140be5ac53ac580c6e59e682d (diff)
Don't destroy sysvshm if the vmspace is shared (only affects uvm)
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 3f9ad4c9711..b0d9b8263b2 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.18 1999/06/23 09:44:28 art Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.19 1999/07/15 14:11:05 art Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -146,7 +146,7 @@ exit1(p, rv)
/* The next three chunks should probably be moved to vmspace_exit. */
vm = p->p_vmspace;
#ifdef SYSVSHM
- if (vm->vm_shm)
+ if (vm->vm_shm && vm->vm_refcnt == 1)
shmexit(vm);
#endif
#ifdef SYSVSEM