summaryrefslogtreecommitdiffstats
path: root/libsensors
diff options
context:
space:
mode:
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;