Merge "Use PLOG and TEMP_FAILURE_RETRY for uevent socket errors" am: 02359c6d96 am: 777cbf21df
am: 76755f20e7
Change-Id: Id808b8d7e72eec69ce79bb3255c5653292e8fc08
diff --git a/init/uevent_listener.cpp b/init/uevent_listener.cpp
index 416d942..d8d9b36 100644
--- a/init/uevent_listener.cpp
+++ b/init/uevent_listener.cpp
@@ -100,7 +100,7 @@
int n = uevent_kernel_multicast_recv(device_fd_, msg, UEVENT_MSG_LEN);
if (n <= 0) {
if (errno != EAGAIN && errno != EWOULDBLOCK) {
- LOG(ERROR) << "Error reading from Uevent Fd";
+ PLOG(ERROR) << "Error reading from Uevent Fd";
}
return false;
}
diff --git a/libcutils/uevent.cpp b/libcutils/uevent.cpp
index 721de7c..bf244d2 100644
--- a/libcutils/uevent.cpp
+++ b/libcutils/uevent.cpp
@@ -60,7 +60,7 @@
struct ucred* cred;
*uid = -1;
- ssize_t n = recvmsg(socket, &hdr, 0);
+ ssize_t n = TEMP_FAILURE_RETRY(recvmsg(socket, &hdr, 0));
if (n <= 0) {
return n;
}