use IGNORE_EINTR w/close
HANDLE_EINTR is both not safe and not useful on Linux systems.
Switch to IGNORE_EINTR like Chromium has done everywhere.
See http://crbug.com/269623 for details.
BUG=chromium:373154
TEST=`cbuildbot {arm,amd64,x86}-generic-full` passes
Change-Id: Ia2ee7db803366f1305919c4c40c2709e62faae20
Reviewed-on: https://chromium-review.googlesource.com/199823
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/utils.h b/utils.h
index 77ed9d9..2961edf 100644
--- a/utils.h
+++ b/utils.h
@@ -480,7 +480,7 @@
explicit ScopedEintrSafeFdCloser(int* fd) : fd_(fd), should_close_(true) {}
~ScopedEintrSafeFdCloser() {
if (should_close_ && fd_ && (*fd_ >= 0)) {
- if (!HANDLE_EINTR(close(*fd_)))
+ if (!IGNORE_EINTR(close(*fd_)))
*fd_ = -1;
}
}