summaryrefslogtreecommitdiff
path: root/debuggerd/debuggerd.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-08-23 19:35:54 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-08-23 19:35:54 +0000
commit82b67fff06363c8e7a17058cb5ce748f21a27f11 (patch)
tree9f457ec946c417bb82804c36b33c4843037c924f /debuggerd/debuggerd.cpp
parent40eff9534e656d67662a30b274b410f4b6294818 (diff)
parent874c674c60bf58a65e0d6e65c5f6d20fff0db3cf (diff)
Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later."
Diffstat (limited to 'debuggerd/debuggerd.cpp')
-rw-r--r--debuggerd/debuggerd.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp
index 61cceb048..c578d658b 100644
--- a/debuggerd/debuggerd.cpp
+++ b/debuggerd/debuggerd.cpp
@@ -193,8 +193,6 @@ static int read_request(int fd, debugger_request_t* out_request) {
}
ALOGV("reading tid");
- fcntl(fd, F_SETFL, O_NONBLOCK);
-
pollfd pollfds[1];
pollfds[0].fd = fd;
pollfds[0].events = POLLIN;
@@ -828,7 +826,7 @@ static int do_server() {
socklen_t alen = sizeof(ss);
ALOGV("waiting for connection\n");
- int fd = accept4(s, addrp, &alen, SOCK_CLOEXEC);
+ int fd = accept4(s, addrp, &alen, SOCK_CLOEXEC | SOCK_NONBLOCK);
if (fd == -1) {
ALOGE("accept failed: %s\n", strerror(errno));
continue;