Don't use TEMP_FAILURE_RETRY on close in bionic.
Bug: http://b/20501816
Change-Id: Id64b5109cc2b165fa0351b6edbb865a5e5058008
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c
index 13b9887..fc2115e 100644
--- a/libc/stdio/stdio.c
+++ b/libc/stdio/stdio.c
@@ -86,5 +86,5 @@
int
__sclose(void *cookie)
{
- return TEMP_FAILURE_RETRY(close(((FILE *)cookie)->_file));
+ return close(((FILE *)cookie)->_file);
}
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 8554fbb..4e39be6 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -2414,8 +2414,7 @@
/* If /dev/null is not one of the stdio file descriptors, close it. */
if (dev_null > 2) {
TRACE("[ Closing /dev/null file-descriptor=%d]", dev_null);
- status = TEMP_FAILURE_RETRY(close(dev_null));
- if (status == -1) {
+ if (close(dev_null) == -1) {
DL_ERR("close failed: %s", strerror(errno));
return_value = -1;
}