summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2011-11-09 23:43:09 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-09 23:43:09 +0000
commitcdf42b730b95b6a3ffb17c7a96452a606eb6d61b (patch)
treeb8f81a9c3a538ab185de91b824a1ca5e085c67c8 /libsensors
parent7805c109085c3b4107e4fd283291fdd16c8e26f1 (diff)
parenta0b9e472a70f4e380bfe06a25a44fb1242bf94ef (diff)
downloaddevice_samsung_tuna-cdf42b730b95b6a3ffb17c7a96452a606eb6d61b.zip
device_samsung_tuna-cdf42b730b95b6a3ffb17c7a96452a606eb6d61b.tar.gz
device_samsung_tuna-cdf42b730b95b6a3ffb17c7a96452a606eb6d61b.tar.bz2
am 477abd91: sensors: Retry poll on EINTR
* commit 'a0b9e472a70f4e380bfe06a25a44fb1242bf94ef': sensors: Retry poll on EINTR
Diffstat (limited to 'libsensors')
-rw-r--r--libsensors/sensors.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libsensors/sensors.cpp b/libsensors/sensors.cpp
index a884ce7..156f08d 100644
--- a/libsensors/sensors.cpp
+++ b/libsensors/sensors.cpp
@@ -302,7 +302,9 @@ int sensors_poll_context_t::pollEvents(sensors_event_t* data, int count)
// anything to return
int i;
- n = poll(mPollFds, numFds, nbEvents ? 0 : polltime);
+ do {
+ n = poll(mPollFds, numFds, nbEvents ? 0 : polltime);
+ } while (n < 0 && errno == EINTR);
if (n<0) {
LOGE("poll() failed (%s)", strerror(errno));
return -errno;