I found an interesting point: the atexit() function works differently for bionic and glibc . Here is an example:
#include <cstdlib> #include <cstdio> extern "C" { void one(){ printf("one\n"); } void two() { printf("two\n"); atexit(one); } } int main() { atexit(two); }
Results for bionic :
two
Results for glibc :
two one
Why are the results different?
source share