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 | e4f96dfb06ef16b28c8847cdf33afca9ba10ed55 (patch) | |
tree | acede3518614c768add8a79905ec9bfbaded98f1 /libsensors | |
parent | a3c814110b2cd208b1757df109a3a4922f55af34 (diff) | |
parent | ece6e5bcf1aea9803df0a73a79dfc23e61ada2df (diff) | |
download | device_samsung_tuna-e4f96dfb06ef16b28c8847cdf33afca9ba10ed55.zip device_samsung_tuna-e4f96dfb06ef16b28c8847cdf33afca9ba10ed55.tar.gz device_samsung_tuna-e4f96dfb06ef16b28c8847cdf33afca9ba10ed55.tar.bz2 |
am ece6e5bc: am 477abd91: sensors: Retry poll on EINTR
* commit 'ece6e5bcf1aea9803df0a73a79dfc23e61ada2df':
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; |