tombstoned: don't bail out if we fail to unlink a file that isn't there.

Bug: http://b/77729983
Test: crasher with no tombstones
Change-Id: I20e0537a347dd1f83877150ab13f53441dd65d95
(cherry picked from commit 28f8cf0f97)
This commit is contained in:
Josh Gao 2018-05-03 14:31:08 -07:00
parent 598061ff6d
commit 5a9929a392
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}