diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c index 13b98877d..fc2115e9b 100644 --- a/libc/stdio/stdio.c +++ b/libc/stdio/stdio.c @@ -86,5 +86,5 @@ __sseek(void *cookie, fpos_t offset, int whence) 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 8554fbbd1..4e39be68b 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -2414,8 +2414,7 @@ static int nullify_closed_stdio() { /* 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; }