diff options
author | Magnus Blåudd <magnus.blaudd@sun.com> | 2009-09-28 14:40:20 +0200 |
---|---|---|
committer | Magnus Blåudd <magnus.blaudd@sun.com> | 2009-09-28 14:40:20 +0200 |
commit | 58628cbbb4a20184789e01fd855afc911f968356 (patch) | |
tree | ced3f50d98be5489ea9a9b8eb63b1443e4d1a686 /mysys | |
parent | 19f02facb7e5b11055aa767bdbe50d56e2989666 (diff) | |
parent | 9eab1cdb9ae94120dd35aeee13c13295ba59ee3b (diff) | |
download | mariadb-git-58628cbbb4a20184789e01fd855afc911f968356.tar.gz |
Merge bug#42850 to 5.0
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_thr_init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index c446808c7da..64fc99952e9 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -107,10 +107,11 @@ my_bool my_thread_global_init(void) pthread_attr_t dummy_thread_attr; pthread_attr_init(&dummy_thread_attr); - pthread_attr_setdetachstate(&dummy_thread_attr, PTHREAD_CREATE_DETACHED); + pthread_attr_setdetachstate(&dummy_thread_attr, PTHREAD_CREATE_JOINABLE); - pthread_create(&dummy_thread,&dummy_thread_attr, - nptl_pthread_exit_hack_handler, NULL); + if (pthread_create(&dummy_thread,&dummy_thread_attr, + nptl_pthread_exit_hack_handler, NULL) == 0) + (void)pthread_join(dummy_thread, NULL); } #endif /* TARGET_OS_LINUX */ |