summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMagnus Blåudd <magnus.blaudd@sun.com>2009-09-28 14:40:45 +0200
committerMagnus Blåudd <magnus.blaudd@sun.com>2009-09-28 14:40:45 +0200
commit0b8953ba67340a89d7517e0f634bb7e12120b212 (patch)
treef0611684eab51ce0718937c9fdb8d9024ca11f81 /mysys
parent96665fd9ccda9d9c129c5e421b10d00ccf78e5de (diff)
parentc4318b56ba8d2514dfb4a8628025cf6daaef11b5 (diff)
downloadmariadb-git-0b8953ba67340a89d7517e0f634bb7e12120b212.tar.gz
Merge bug#42850 to 5.1
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_thr_init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 2278c467f32..d8c7d85ff30 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -108,10 +108,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 */