Write message to stderr on __libc_fatal()

Change-Id: Ia8d6e256768fa51786d0139d3f3b6e9e4bebe027
This commit is contained in:
Dmitriy Ivanov
2014-07-01 14:24:45 -07:00
parent 176ccd4925
commit 12bf3bcdee
2 changed files with 5 additions and 9 deletions

View File

@@ -619,7 +619,8 @@ static void __libc_fatal(const char* format, va_list args) {
BufferOutputStream os(msg, sizeof(msg));
out_vformat(os, format, args);
// TODO: log to stderr for the benefit of "adb shell" users.
// log to stderr for the benefit of "adb shell" users.
write(2, msg, strlen(msg));
// Log to the log for the benefit of regular app developers (whose stdout and stderr are closed).
__libc_write_log(ANDROID_LOG_FATAL, "libc", msg);