summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-08-23 01:20:36 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-08-23 01:20:36 +0000
commit33f8c194f9379ffa444c3c44d23e70f80fef5e5b (patch)
treeb6458ea4200aa8f57a9c51320c72e4fbde231cee
parente4d79532de4c6e89d973dcc9f93dc16377672b70 (diff)
parentfca43d3ec5b39f870a93fa631c5790317689943e (diff)
downloadsystem_core-33f8c194f9379ffa444c3c44d23e70f80fef5e5b.tar.gz
system_core-33f8c194f9379ffa444c3c44d23e70f80fef5e5b.tar.bz2
system_core-33f8c194f9379ffa444c3c44d23e70f80fef5e5b.zip
Merge "liblog: use SOCK_NONBLOCK directly."
am: fca43d3ec5 Change-Id: I4d959d9091adbf8bf2d7b68653a3c6064893a65a
-rw-r--r--liblog/logd_writer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/liblog/logd_writer.c b/liblog/logd_writer.c
index 059f17034..ed82902b4 100644
--- a/liblog/logd_writer.c
+++ b/liblog/logd_writer.c
@@ -67,12 +67,9 @@ static int logdOpen()
int i, ret = 0;
if (logdLoggerWrite.context.sock < 0) {
- i = TEMP_FAILURE_RETRY(socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0));
+ i = TEMP_FAILURE_RETRY(socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0));
if (i < 0) {
ret = -errno;
- } else if (TEMP_FAILURE_RETRY(fcntl(i, F_SETFL, O_NONBLOCK)) < 0) {
- ret = -errno;
- close(i);
} else {
struct sockaddr_un un;
memset(&un, 0, sizeof(struct sockaddr_un));