diff options
author | Josh Gao <jmgao@google.com> | 2017-01-25 19:14:08 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-01-25 19:14:09 +0000 |
commit | fc12c4b81ef026ff2835d8fc18d9cb271d52b0ac (patch) | |
tree | 89e70a74d4b8132a6e4bd3ef7415ed0d5d4ec103 /debuggerd/crash_dump.cpp | |
parent | 0a3c2392c71d651d14e23085d18dd1253d47dee8 (diff) | |
parent | 0a37901b9f83f75579634afcc3dc8eb1b4a116ce (diff) |
Merge "crash_dump: properly dump when we can't talk to tombstoned."
Diffstat (limited to 'debuggerd/crash_dump.cpp')
-rw-r--r-- | debuggerd/crash_dump.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index e4f88b0fa..c14593393 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -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"; } |