Merge "crash_dump: properly dump when we can't talk to tombstoned."
This commit is contained in:
commit
fc12c4b81e
1 changed files with 2 additions and 1 deletions
|
|
@ -284,6 +284,7 @@ int main(int argc, char** argv) {
|
||||||
} else {
|
} else {
|
||||||
unique_fd devnull(TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR)));
|
unique_fd devnull(TEMP_FAILURE_RETRY(open("/dev/null", O_RDWR)));
|
||||||
TEMP_FAILURE_RETRY(dup2(devnull.get(), STDOUT_FILENO));
|
TEMP_FAILURE_RETRY(dup2(devnull.get(), STDOUT_FILENO));
|
||||||
|
output_fd = std::move(devnull);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(INFO) << "performing dump of process " << target << " (target tid = " << main_tid << ")";
|
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 before we notify tombstoned of completion.
|
||||||
close(STDOUT_FILENO);
|
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";
|
LOG(ERROR) << "failed to notify tombstoned of completion";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue