diff options
author | Arve Hjønnevåg <arve@android.com> | 2011-11-10 18:34:39 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-10 18:34:39 +0000 |
commit | 3a1762642df9384c41431819942b1cbff45e5b1a (patch) | |
tree | 65ba2108c10950fed3c973707dd432fe98e7e135 /libsensors | |
parent | c9e17f58101eafb4b7aaa8a30efea337978b9160 (diff) | |
parent | cdf42b730b95b6a3ffb17c7a96452a606eb6d61b (diff) | |
download | device_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.cpp | 4 |
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; |