diff options
author | Brian Carlstrom <bdc@google.com> | 2014-09-30 16:18:01 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2014-10-03 17:23:09 -0700 |
commit | 8c52a3f534c49580688239549fca937b36fc0aed (patch) | |
tree | 1574a4717541ed23930d5be3e3825f069c279057 /patchoat | |
parent | fc95176845e1db99115202d7f64c03d521ca0aab (diff) | |
download | art-8c52a3f534c49580688239549fca937b36fc0aed.zip art-8c52a3f534c49580688239549fca937b36fc0aed.tar.gz art-8c52a3f534c49580688239549fca937b36fc0aed.tar.bz2 |
Add some missing TEMP_FAILURE_RETRYs around unlink(2)
Change-Id: Ibf446d37092933dce165d7a95c0ff2e52b94ce46
Diffstat (limited to 'patchoat')
-rw-r--r-- | patchoat/patchoat.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index c457ecd..bbaf0e4 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -748,7 +748,7 @@ static File* CreateOrOpen(const char* name, bool* created) { if (f.get() != nullptr) { if (fchmod(f->Fd(), 0644) != 0) { PLOG(ERROR) << "Unable to make " << name << " world readable"; - unlink(name); + TEMP_FAILURE_RETRY(unlink(name)); return nullptr; } } @@ -1066,11 +1066,11 @@ static int patchoat(int argc, char **argv) { if (!success) { if (new_oat_out) { CHECK(!output_oat_filename.empty()); - unlink(output_oat_filename.c_str()); + TEMP_FAILURE_RETRY(unlink(output_oat_filename.c_str())); } if (new_image_out) { CHECK(!output_image_filename.empty()); - unlink(output_image_filename.c_str()); + TEMP_FAILURE_RETRY(unlink(output_image_filename.c_str())); } } if (dump_timings) { |