Don't TEMP_FAILURE_RETRY on close.
close always succeeds, even if it was interrupted and "fails" with
EINTR. Retrying will either close a nonexistent fd or stomp on another
thread's newly opened file descriptor.
Bug: http://b/20501816
Test: treehugger
Change-Id: I706d5e8027e60b13f23f9488fdf5cf7cef7b3d3b
diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp
index 45e0c26..7b4a5a0 100644
--- a/libfec/fec_open.cpp
+++ b/libfec/fec_open.cpp
@@ -415,7 +415,7 @@
warn("fdatasync failed: %s", strerror(errno));
}
- TEMP_FAILURE_RETRY(close(f->fd));
+ close(f->fd);
}
if (f->verity.hash) {