summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_fork.c
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2016-04-04 23:55:32 +0000
committergjb <gjb@FreeBSD.org>2016-04-04 23:55:32 +0000
commit1dc4c40e3b35564cb2e787ad968e6b4a9fb7eb0f (patch)
treea027fe5a27446f32854d6a07b34b5f2a992bf283 /lib/libthr/thread/thr_fork.c
parent3669a0dced7e344be71d234ffc3a71530ef0ae08 (diff)
parent589cedfe0cde2b49d5f47fc240de37c8bf307abd (diff)
downloadFreeBSD-src-1dc4c40e3b35564cb2e787ad968e6b4a9fb7eb0f.zip
FreeBSD-src-1dc4c40e3b35564cb2e787ad968e6b4a9fb7eb0f.tar.gz
MFH
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'lib/libthr/thread/thr_fork.c')
-rw-r--r--lib/libthr/thread/thr_fork.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c
index 7256b68..531e09c 100644
--- a/lib/libthr/thread/thr_fork.c
+++ b/lib/libthr/thread/thr_fork.c
@@ -168,6 +168,7 @@ __thr_fork(void)
if (_thr_isthreaded() != 0) {
was_threaded = 1;
_malloc_prefork();
+ __thr_pshared_atfork_pre();
_rtld_atfork_pre(rtld_locks);
} else {
was_threaded = 0;
@@ -202,8 +203,10 @@ __thr_fork(void)
_thr_signal_postfork_child();
- if (was_threaded)
+ if (was_threaded) {
_rtld_atfork_post(rtld_locks);
+ __thr_pshared_atfork_post();
+ }
_thr_setthreaded(0);
/* reinitalize library. */
@@ -236,6 +239,7 @@ __thr_fork(void)
if (was_threaded) {
_rtld_atfork_post(rtld_locks);
+ __thr_pshared_atfork_post();
_malloc_postfork();
}
OpenPOWER on IntegriCloud