Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later." am: 82b67fff06
am: 0d2ef3dc86
Change-Id: Ie8ae5707455f4d1741ca87ef515ea9a142e05aa5
This commit is contained in:
commit
50a99aa6cb
1 changed files with 1 additions and 3 deletions
|
|
@ -203,8 +203,6 @@ static int read_request(int fd, debugger_request_t* out_request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ALOGV("reading tid");
|
ALOGV("reading tid");
|
||||||
fcntl(fd, F_SETFL, O_NONBLOCK);
|
|
||||||
|
|
||||||
pollfd pollfds[1];
|
pollfd pollfds[1];
|
||||||
pollfds[0].fd = fd;
|
pollfds[0].fd = fd;
|
||||||
pollfds[0].events = POLLIN;
|
pollfds[0].events = POLLIN;
|
||||||
|
|
@ -879,7 +877,7 @@ static int do_server() {
|
||||||
socklen_t alen = sizeof(ss);
|
socklen_t alen = sizeof(ss);
|
||||||
|
|
||||||
ALOGV("waiting for connection\n");
|
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) {
|
if (fd == -1) {
|
||||||
ALOGE("accept failed: %s\n", strerror(errno));
|
ALOGE("accept failed: %s\n", strerror(errno));
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue