Skip to content

Commit

Permalink
sensord: Handle EINTR for GPIO event reading (#33715)
Browse files Browse the repository at this point in the history
handle eintr
  • Loading branch information
deanlee authored Oct 9, 2024
1 parent 682857f commit 48abdf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/sensord/sensors_qcom2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void interrupt_loop(std::vector<std::tuple<Sensor *, std::string>> sensors) {

// Read all events
struct gpioevent_data evdata[16];
err = read(fd, evdata, sizeof(evdata));
err = HANDLE_EINTR(read(fd, evdata, sizeof(evdata)));
if (err < 0 || err % sizeof(*evdata) != 0) {
LOGE("error reading event data %d", err);
continue;
Expand Down

0 comments on commit 48abdf8

Please sign in to comment.