Merge "crash_dump: properly dump when we can't talk to tombstoned." am: fc12c4b81e am: deec0278ab am: b56f545469
am: 7ad139b873
Change-Id: I10534c61ea6048d0649bb6fb84f6a302b6122fff
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp
index e4f88b0..c145933 100644
--- a/debuggerd/crash_dump.cpp
+++ b/debuggerd/crash_dump.cpp
@@ -284,6 +284,7 @@
} else {
unique_fd devnull(TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR)));
TEMP_FAILURE_RETRY(dup2(devnull.get(), STDOUT_FILENO));
+ output_fd = std::move(devnull);
}
LOG(INFO) << "performing dump of process " << target << " (target tid = " << main_tid << ")";
@@ -395,7 +396,7 @@
// Close stdout before we notify tombstoned of completion.
close(STDOUT_FILENO);
- if (!tombstoned_notify_completion(tombstoned_socket.get())) {
+ if (tombstoned_connected && !tombstoned_notify_completion(tombstoned_socket.get())) {
LOG(ERROR) << "failed to notify tombstoned of completion";
}