summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-12-28 14:13:38 -0800
committerJosh Gao <jmgao@google.com>2017-12-28 14:19:57 -0800
commitf734741e3d7e71111b4ecb404bcec8d90f36f389 (patch)
tree8305dfbda178ee8a3526bc7dc8d673d3bbd7d158 /libfec
parent46a33e93c8e8a48cb5aba8e07cda315ee4d3e25c (diff)
downloadextras-f734741e3d7e71111b4ecb404bcec8d90f36f389.tar.gz
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
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_open.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp
index 45e0c263..7b4a5a07 100644
--- a/libfec/fec_open.cpp
+++ b/libfec/fec_open.cpp
@@ -415,7 +415,7 @@ int fec_close(struct fec_handle *f)
warn("fdatasync failed: %s", strerror(errno));
}
- TEMP_FAILURE_RETRY(close(f->fd));
+ close(f->fd);
}
if (f->verity.hash) {