summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_exit.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2010-09-19 09:03:11 +0000
committerdavidxu <davidxu@FreeBSD.org>2010-09-19 09:03:11 +0000
commitfe5567c8f172d8218fb37af60118825748628d44 (patch)
tree21699abe5fd839789147e1721b9b3cd97787d6c1 /lib/libthr/thread/thr_exit.c
parent5418a235978733112ea2f114b3826d95346409e8 (diff)
downloadFreeBSD-src-fe5567c8f172d8218fb37af60118825748628d44.zip
FreeBSD-src-fe5567c8f172d8218fb37af60118825748628d44.tar.gz
Because atfork lock is held while forking, a thread cancellation triggered
by atfork handler is unsafe, use intenal flag no_cancel to disable it.
Diffstat (limited to 'lib/libthr/thread/thr_exit.c')
-rw-r--r--lib/libthr/thread/thr_exit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c
index 9c5fd95..5cc3a35 100644
--- a/lib/libthr/thread/thr_exit.c
+++ b/lib/libthr/thread/thr_exit.c
@@ -206,7 +206,7 @@ _pthread_exit_mask(void *status, sigset_t *mask)
/* Flag this thread as exiting. */
curthread->cancelling = 1;
- curthread->cancel_enable = 0;
+ curthread->no_cancel = 1;
curthread->cancel_async = 0;
curthread->cancel_point = 0;
if (mask != NULL)
OpenPOWER on IntegriCloud