From 28f8cf0f975500d754e259e19dcf9762f0969060 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Thu, 3 May 2018 14:31:08 -0700 Subject: [PATCH] tombstoned: don't bail out if we fail to unlink a file that isn't there. Test: crasher with no tombstones Change-Id: I20e0537a347dd1f83877150ab13f53441dd65d95 --- debuggerd/tombstoned/tombstoned.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { std::string fd_path = StringPrintf("/proc/self/fd/%d", crash->crash_tombstone_fd.get()); std::string tombstone_path = CrashQueue::for_crash(crash)->get_next_artifact_path(); int rc = unlink(tombstone_path.c_str()); - if (rc != 0) { + if (rc != 0 && errno != ENOENT) { PLOG(ERROR) << "failed to unlink tombstone at " << tombstone_path; goto fail; }