multiple atexit() calls
$ grep -FIR 'atexit('
src/lib/mysql/mysql_connection.cc:bool MySqlHolder::atexit_ = []{atexit([]{mysql_library_end();});return true;};
src/lib/cryptolink/botan_link.cc: atexit([]{ getCryptoLink().getRNG().reset(); });
Problem: One atexit()
call overrides the other.
Disclaimer: The fact that mysql_library_end()
can never be called in this code is handled in !1371 (merged).
Proposed solution: Get rid of these atexit()
calls and move the content to destructors.
Less preferred proposed solution: Have an AtExitManager
that adds functions to the previously registered functions.