Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cbe66b6 authored by Yifan Hong's avatar Yifan Hong
Browse files

binder: don't specify POLLHUP in .events for poll()

According to poll(2), POLLHUP is ignored in .events. Don't specify
it.

Test: pass
Change-Id: Id9cc908f11bcb914a30dad9e407cb17c1ab00979
parent f1aa6cdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ bool FdTrigger::isTriggered() {
status_t FdTrigger::triggerablePoll(base::borrowed_fd fd, int16_t event) {
    while (true) {
        pollfd pfd[]{{.fd = fd.get(), .events = static_cast<int16_t>(event), .revents = 0},
                     {.fd = mRead.get(), .events = POLLHUP, .revents = 0}};
                     {.fd = mRead.get(), .events = 0, .revents = 0}};
        int ret = TEMP_FAILURE_RETRY(poll(pfd, arraysize(pfd), -1));
        if (ret < 0) {
            return -errno;