summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2010-07-12 03:52:53 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2010-07-12 03:52:53 +0000
commit971aa48330d3361114925751a573a33219869738 (patch)
treee3360b571348abf6b1d4265992561542cf0c93c1 /lib
parent6f8fde61935df53bb03974677ffff0a453b1a425 (diff)
After forking, clear the 'thread joining this one' pointer in the child,
as the child only has the one thread remaining. ok marc@
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/uthread/uthread_fork.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpthread/uthread/uthread_fork.c b/lib/libpthread/uthread/uthread_fork.c
index e80f2b3a140..16e32969e4f 100644
--- a/lib/libpthread/uthread/uthread_fork.c
+++ b/lib/libpthread/uthread/uthread_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_fork.c,v 1.21 2009/12/06 17:54:59 kurt Exp $ */
+/* $OpenBSD: uthread_fork.c,v 1.22 2010/07/12 03:52:52 guenther Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -184,6 +184,9 @@ _dofork(int vfork)
/* Re-init the threads mutex queue: */
TAILQ_INIT(&curthread->mutexq);
+ /* no one is joining the remaining thread */
+ curthread->joiner = NULL;
+
/* single threaded now */
__isthreaded = 0;