Merge "Revert "uevent.c: avoid POLLERR infinite loop"" into main

This commit is contained in:
Steven Moreland 2024-01-08 19:18:48 +00:00 committed by Gerrit Code Review
commit ce4e1d99ad
2 changed files with 0 additions and 13 deletions

View file

@ -79,7 +79,6 @@ cc_library_shared {
shared_libs: [
"android.system.suspend-V1-ndk",
"libdl",
"liblog",
],
header_libs: [

View file

@ -16,8 +16,6 @@
#include <hardware_legacy/uevent.h>
#include <log/log.h>
#include <malloc.h>
#include <string.h>
#include <unistd.h>
@ -96,16 +94,6 @@ int uevent_next_event(char* buffer, int buffer_length)
return count;
}
}
if (nr > 0 && (fds.revents & POLLERR)) {
int error = 0;
socklen_t errlen = sizeof(error);
getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &errlen);
// see b/300009377, this used to be an infinite loop
// abort to try to recover
LOG_ALWAYS_FATAL("Uevent POLLERR: %s, on FD %d", strerror(error), fd);
}
}
// won't get here