X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fexit%2Fexit.c;fp=src%2Fexit%2Fexit.c;h=03c46ca541e6479f44bcee56fd828f347db615df;hp=fc2914844959eac78a3f76dccb302ef0d3d8fe25;hb=ad5a332c750550adbd45f474e5936cae65b4fd5e;hpb=de05a2ac22d33bd7631f182143ecea6dd01d9406 diff --git a/src/exit/exit.c b/src/exit/exit.c index fc291484..03c46ca5 100644 --- a/src/exit/exit.c +++ b/src/exit/exit.c @@ -20,13 +20,10 @@ void exit(int code) /* If more than one thread calls exit, hang until _Exit ends it all */ while (a_swap(&lock, 1)) __syscall(SYS_pause); - /* Only do atexit & stdio flush if they were actually used */ __funcs_on_exit(); - __fflush_on_exit(); - - /* Destructor s**t is kept separate from atexit to avoid bloat */ if (libc.fini) libc.fini(); if (libc.ldso_fini) libc.ldso_fini(); + __fflush_on_exit(); _Exit(code); for(;;);