diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 1999-07-15 14:11:06 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 1999-07-15 14:11:06 +0000 |
commit | 7bdb8bc6dd617efd36012f956c9992b1cfa8e85c (patch) | |
tree | 54d1ac29efc0e963f5b33d4f5b1295cdb09c6dfa /sys/kern/kern_exec.c | |
parent | 388ce0bc8d4ed3c140be5ac53ac580c6e59e682d (diff) |
Don't destroy sysvshm if the vmspace is shared (only affects uvm)
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 4 |
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, |