Snap for 11275547 from 7446e52665
to 24D1-release
Change-Id: I4bca0547df227b375dd39d80530c896d2e46faa1
This commit is contained in:
commit
edd770491c
2 changed files with 13 additions and 0 deletions
|
@ -79,6 +79,7 @@ cc_library_shared {
|
|||
shared_libs: [
|
||||
"android.system.suspend-V1-ndk",
|
||||
"libdl",
|
||||
"liblog",
|
||||
],
|
||||
|
||||
header_libs: [
|
||||
|
|
12
uevent.c
12
uevent.c
|
@ -16,6 +16,8 @@
|
|||
|
||||
#include <hardware_legacy/uevent.h>
|
||||
|
||||
#include <log/log.h>
|
||||
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
@ -94,6 +96,16 @@ 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
|
||||
|
|
Loading…
Reference in a new issue