OSDN Git Service

Stop wrapping close(2) with TEMP_FAILURE_RETRY in art.
authorElliott Hughes <enh@google.com>
Fri, 15 May 2015 15:25:58 +0000 (08:25 -0700)
committerElliott Hughes <enh@google.com>
Fri, 15 May 2015 15:25:58 +0000 (08:25 -0700)
Note that all the TEMP_FAILURE_RETRY([A-Z] calls in this file are
wrong. The member functions return -errno, so only an EPERM failure
will return -1 (but errno should be EPERM, so you won't loop).

Bug: http://b/20501816
Change-Id: Ibde6a2c7bf92469d008d6d510f9391669ae37a84

runtime/base/unix_file/fd_file.cc

index f272d88..07cadc4 100644 (file)
@@ -107,7 +107,7 @@ bool FdFile::Open(const std::string& path, int flags, mode_t mode) {
 }
 
 int FdFile::Close() {
-  int result = TEMP_FAILURE_RETRY(close(fd_));
+  int result = close(fd_);
 
   // Test here, so the file is closed and not leaked.
   if (kCheckSafeUsage) {