summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Gao2018-05-03 16:31:08 -0500
committerJosh Gao2018-05-03 16:31:08 -0500
commit28f8cf0f975500d754e259e19dcf9762f0969060 (patch)
tree086b700620066ba2238c85226f3ee55bbf91fbc1
parentabf6a2e1ade1d89b3bb83d8f0b7d77a62a3b31c5 (diff)
downloadplatform-system-core-28f8cf0f975500d754e259e19dcf9762f0969060.tar.gz
platform-system-core-28f8cf0f975500d754e259e19dcf9762f0969060.tar.xz
platform-system-core-28f8cf0f975500d754e259e19dcf9762f0969060.zip
tombstoned: don't bail out if we fail to unlink a file that isn't there.
Test: crasher with no tombstones Change-Id: I20e0537a347dd1f83877150ab13f53441dd65d95
-rw-r--r--debuggerd/tombstoned/tombstoned.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/debuggerd/tombstoned/tombstoned.cpp b/debuggerd/tombstoned/tombstoned.cpp
index 5dffa5b3c..2f16eb249 100644
--- a/debuggerd/tombstoned/tombstoned.cpp
+++ b/debuggerd/tombstoned/tombstoned.cpp
@@ -352,7 +352,7 @@ static void crash_completed_cb(evutil_socket_t sockfd, short ev, void* arg) {
352 std::string fd_path = StringPrintf("/proc/self/fd/%d", crash->crash_tombstone_fd.get()); 352 std::string fd_path = StringPrintf("/proc/self/fd/%d", crash->crash_tombstone_fd.get());
353 std::string tombstone_path = CrashQueue::for_crash(crash)->get_next_artifact_path(); 353 std::string tombstone_path = CrashQueue::for_crash(crash)->get_next_artifact_path();
354 int rc = unlink(tombstone_path.c_str()); 354 int rc = unlink(tombstone_path.c_str());
355 if (rc != 0) { 355 if (rc != 0 && errno != ENOENT) {
356 PLOG(ERROR) << "failed to unlink tombstone at " << tombstone_path; 356 PLOG(ERROR) << "failed to unlink tombstone at " << tombstone_path;
357 goto fail; 357 goto fail;
358 } 358 }