commit | 34bf6107b6bbd44863e1e620f05014f6d7ee0aa3 | [log] [tgz] |
---|---|---|
author | Ryan Prichard <rprichard@google.com> | Fri Apr 26 21:51:05 2019 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Apr 26 21:51:05 2019 +0000 |
tree | 77f7ba33e94575a6b2cf8b4dcc10835abec81902 | |
parent | 70f090e4e803716f0532071128002ce021fa0626 [diff] | |
parent | c5d8c6c6e47a7f5fd0c3db2a48004be1030cf753 [diff] |
Merge "__cxa_finalize: skip fflush call on dlclose"
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index bd6ac3d..692e0c0 100644 --- a/libc/stdlib/atexit.c +++ b/libc/stdlib/atexit.c
@@ -186,7 +186,10 @@ } _ATEXIT_UNLOCK(); - fflush(NULL); + /* If called via exit(), flush output of all open files. */ + if (dso == NULL) { + fflush(NULL); + } /* BEGIN android-changed: call __unregister_atfork if dso is not null */ if (dso != NULL) {