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 | d77f5b33afdbcce622282d62874545ee186b6b6c (patch) | |
| tree | ced3f50d98be5489ea9a9b8eb63b1443e4d1a686 | |
| parent | c5236fa36609f5ace5a70c76c3222ecd79f0aee8 (diff) | |
| parent | cc8bc86b373061feedd43681e94b37775aca59f4 (diff) | |
| download | mariadb-git-d77f5b33afdbcce622282d62874545ee186b6b6c.tar.gz | |
Merge bug#42850 to 5.0
| -rw-r--r-- | client/mysqltest.c | 2 | ||||
| -rw-r--r-- | mysys/my_thr_init.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c index 79df511641d..4f8e6cdac99 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1406,7 +1406,7 @@ void show_diff(DYNAMIC_STRING* ds, else diff_name = 0; #else - diff_name = "diff"; // Otherwise always assume it's called diff + diff_name = "diff"; /* Otherwise always assume it's called diff */ #endif if (diff_name) 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 */ |
