diff options
author | Magnus Blåudd <magnus.blaudd@sun.com> | 2009-09-28 14:40:45 +0200 |
---|---|---|
committer | Magnus Blåudd <magnus.blaudd@sun.com> | 2009-09-28 14:40:45 +0200 |
commit | 0b4b5569116d5ae775f91c9c8e8d464d693a0d3f (patch) | |
tree | f0611684eab51ce0718937c9fdb8d9024ca11f81 /mysys | |
parent | 90d4b21d1d8418d4e6180cddbebd90daeea5b02d (diff) | |
parent | 56b7b74b2553f595f266a8346452bc5bb96f25a6 (diff) | |
download | mariadb-git-0b4b5569116d5ae775f91c9c8e8d464d693a0d3f.tar.gz |
Merge bug#42850 to 5.1
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 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 */ |