diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-28 15:54:24 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-28 15:54:24 +0200 |
commit | d50cf42bc05b1faa5d39c766389ac345e119037e (patch) | |
tree | a5cc81b5d0612dc9a0f1e7d8092005096818420d /storage/xtradb/os/os0thread.cc | |
parent | dc9f5dfcbb8efbc7c1f178313f945981b01d229b (diff) | |
download | mariadb-git-d50cf42bc05b1faa5d39c766389ac345e119037e.tar.gz |
MDEV-9282 Debian: the Lintian complains about "shlib-calls-exit" in ha_innodb.so
Replace all exit() calls in InnoDB with abort() [possibly via ut_a()].
Calling exit() in a multi-threaded program is problematic also for
the reason that other threads could see corrupted data structures
while some data structures are being cleaned up by atexit() handlers
or similar.
In the long term, all these calls should be replaced with something
that returns an error all the way up the call stack.
Diffstat (limited to 'storage/xtradb/os/os0thread.cc')
-rw-r--r-- | storage/xtradb/os/os0thread.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/storage/xtradb/os/os0thread.cc b/storage/xtradb/os/os0thread.cc index af826027efc..5ddc40b0eeb 100644 --- a/storage/xtradb/os/os0thread.cc +++ b/storage/xtradb/os/os0thread.cc @@ -192,11 +192,7 @@ os_thread_create_func( #else ret = pthread_create(&pthread, &attr, func, arg); #endif - if (ret) { - fprintf(stderr, - "InnoDB: Error: pthread_create returned %d\n", ret); - exit(1); - } + ut_a(ret == 0); #ifndef UNIV_HPUX10 pthread_attr_destroy(&attr); |