diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/binder/FdTrigger.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/binder/FdTrigger.cpp b/libs/binder/FdTrigger.cpp index 455a4338e5..f0aa801d01 100644 --- a/libs/binder/FdTrigger.cpp +++ b/libs/binder/FdTrigger.cpp @@ -82,7 +82,9 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd, int ret = TEMP_FAILURE_RETRY(poll(pfd, countof(pfd), -1)); if (ret < 0) { - return -errno; + int saved_errno = errno; + ALOGE("FdTrigger poll returned error: %d, with error: %s", ret, strerror(saved_errno)); + return -saved_errno; } LOG_ALWAYS_FATAL_IF(ret == 0, "poll(%d) returns 0 with infinite timeout", transportFd.fd.get()); @@ -106,6 +108,7 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd, // POLLNVAL: invalid FD number, e.g. not opened. if (pfd[0].revents & POLLNVAL) { + ALOGE("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd); return BAD_VALUE; } |