summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2011-11-10 18:34:39 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-10 18:34:39 +0000
commit3a1762642df9384c41431819942b1cbff45e5b1a (patch)
tree65ba2108c10950fed3c973707dd432fe98e7e135 /libsensors
parentc9e17f58101eafb4b7aaa8a30efea337978b9160 (diff)
parentcdf42b730b95b6a3ffb17c7a96452a606eb6d61b (diff)
downloaddevice_samsung_tuna-3a1762642df9384c41431819942b1cbff45e5b1a.zip
device_samsung_tuna-3a1762642df9384c41431819942b1cbff45e5b1a.tar.gz
device_samsung_tuna-3a1762642df9384c41431819942b1cbff45e5b1a.tar.bz2
am ece6e5bc: am 477abd91: sensors: Retry poll on EINTR
* commit 'cdf42b730b95b6a3ffb17c7a96452a606eb6d61b': 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 fb159d9..85e3bc1 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;