Merge "liblogcat: redirect logcat output correctly for -Q" am: 151fec4032
am: f2b62408b2
Change-Id: If045db1a428c44bf801c1602dd38bc2c10bc818a
diff --git a/logcat/logcat.cpp b/logcat/logcat.cpp
index 15cef1a..7f852d4 100644
--- a/logcat/logcat.cpp
+++ b/logcat/logcat.cpp
@@ -1231,8 +1231,11 @@
android::close_error(context);
context->stderr_stdout = true;
context->output = fp;
- context->error = context->output;
- if (context->stderr_null) context->error = NULL;
+ context->output_fd = fileno(fp);
+ if (context->stderr_null) break;
+ context->stderr_stdout = true;
+ context->error = fp;
+ context->error_fd = fileno(fp);
}
break;