From 64a92413b6d16e617eb3fa6c10b7d3f5a8437268 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Thu, 12 Aug 2021 16:58:32 -0700 Subject: [PATCH] Modify missing output fd message. The "missing output fd" message can seem like an error, so modify the message to indicate what is really happening. This message will occur normally when running the debuggerd command, or when a bugreport is generated, or when an ANR occurs. In all of those cases, this is not an error, but an expected action. Bug: 196189981 Test: Ran debuggerd -b and debuggerd and verified this message is seen. Test: Ran unit tests. Change-Id: I6e3d5a76d92b972c77fca301ea7147745bc67c37 --- debuggerd/tombstoned/tombstoned.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debuggerd/tombstoned/tombstoned.cpp b/debuggerd/tombstoned/tombstoned.cpp index 05d805097..02ded1efe 100644 --- a/debuggerd/tombstoned/tombstoned.cpp +++ b/debuggerd/tombstoned/tombstoned.cpp @@ -448,8 +448,10 @@ static void crash_completed(borrowed_fd sockfd, std::unique_ptr crash) { return; } - if (crash->output.text.fd == -1) { - LOG(WARNING) << "missing output fd"; + if (crash->output.text.fd < 0) { + if (crash->output.text.fd == -1) { + LOG(WARNING) << "skipping tombstone file creation due to intercept"; + } return; }