diff options
| author | 2009-04-03 04:22:49 +0000 | |
|---|---|---|
| committer | 2009-04-03 04:22:49 +0000 | |
| commit | b70dc0527639b1577be6518c0d434befff8f317a (patch) | |
| tree | 46f4f1b8d31556dcb71f2c49350d180bd0e5b090 /sys/kern/kern_exit.c | |
| parent | Cleanup. These definitions should have died when I removed the lock_time (diff) | |
| download | wireguard-openbsd-b70dc0527639b1577be6518c0d434befff8f317a.tar.xz wireguard-openbsd-b70dc0527639b1577be6518c0d434befff8f317a.zip | |
Fix SEM_UNDO handling for rthreads: use the struct process* instead
of the struct proc* as the identifier for SEM_UNDO tracking and only
call semexit() from the original thread, once the process as a whole
is exiting
ok tedu@
Diffstat (limited to 'sys/kern/kern_exit.c')
| -rw-r--r-- | sys/kern/kern_exit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index acb41b059d4..e69c45f2a6a 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exit.c,v 1.83 2009/03/26 17:24:33 oga Exp $ */ +/* $OpenBSD: kern_exit.c,v 1.84 2009/04/03 04:22:49 guenther Exp $ */ /* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */ /* @@ -60,9 +60,6 @@ #include <sys/ktrace.h> #include <sys/pool.h> #include <sys/mutex.h> -#ifdef SYSVSHM -#include <sys/shm.h> -#endif #ifdef SYSVSEM #include <sys/sem.h> #endif @@ -183,7 +180,8 @@ exit1(struct proc *p, int rv, int flags) fdfree(p); #ifdef SYSVSEM - semexit(p); + if ((p->p_flag & P_THREAD) == 0) + semexit(p->p_p); #endif if (SESS_LEADER(p)) { struct session *sp = p->p_session; |
