diff options
author | Elliott Hughes <enh@google.com> | 2016-08-23 20:05:48 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-08-23 20:05:48 +0000 |
commit | 0d2ef3dc866d625725a69b903144f5d20ef44d49 (patch) | |
tree | 5b98718b7e8d075568f95457fd90c2913c6646bf /debuggerd/debuggerd.cpp | |
parent | 559cc01e3e2c6c5ed1cb2a0ca003ff48b5d0f41d (diff) | |
parent | 82b67fff06363c8e7a17058cb5ce748f21a27f11 (diff) |
Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later."
am: 82b67fff06
Change-Id: I6f2e72a4847fbfac8e1ba78321be7e026f7629bd
Diffstat (limited to 'debuggerd/debuggerd.cpp')
-rw-r--r-- | debuggerd/debuggerd.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/debuggerd/debuggerd.cpp b/debuggerd/debuggerd.cpp index 07e65e392..b59fced8a 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; @@ -829,7 +827,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; |