Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b56f5454 authored by Josh Gao's avatar Josh Gao Committed by android-build-merger
Browse files

Merge "crash_dump: properly dump when we can't talk to tombstoned." am: fc12c4b8

am: deec0278

Change-Id: I39627c0ddd30bad2019fd8b31a3a3472a23efaa8
parents 11c2155d deec0278
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -284,6 +284,7 @@ int main(int argc, char** argv) {
  } 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 @@ int main(int argc, char** argv) {

  // 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";
  }