commit | 8dc7da51b537e301bf6ee05e7fb56e97df23a7d1 | [log] [tgz] |
---|---|---|
author | Ryan Prichard <rprichard@google.com> | Tue Apr 30 19:43:17 2019 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Tue Apr 30 19:43:17 2019 +0000 |
tree | 39038ec25d6803c3c26a1a784da80ccb3c17e177 | |
parent | 62b214dc87ce76055a21a6f5b9b4fdf37bea1952 [diff] | |
parent | 1f2ea324639f04eeee39f2b2457bc232d967d72c [diff] |
Merge "__cxa_finalize: skip fflush call on dlclose" into qt-dev
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) {