summaryrefslogtreecommitdiff
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 9d8bf191c5a..51920ebba64 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exec.c,v 1.31 1999/07/15 14:07:41 art Exp $ */
+/* $OpenBSD: kern_exec.c,v 1.32 1999/07/15 14:11:05 art Exp $ */
/* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */
/*-
@@ -386,7 +386,7 @@ sys_execve(p, v, retval)
#endif
/* Kill shared memory and unmap old program */
#ifdef SYSVSHM
- if (vm->vm_shm)
+ if (vm->vm_shm && vm->vm_refcnt == 1)
shmexit(vm);
#endif
vm_deallocate(&vm->vm_map, VM_MIN_ADDRESS,