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
This commit is contained in:
Josh Gao 2017-12-28 14:21:32 -08:00
parent 0763ee2450
commit 09a3af5e11

View file

@ -103,7 +103,7 @@ V4L2CameraHAL::V4L2CameraHAL() : mCameras(), mCallbacks(NULL) {
}
}
}
TEMP_FAILURE_RETRY(close(fd));
close(fd);
}
}