Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d2ef3dc authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "debuggerd: set SOCK_NONBLOCK in accept rather than later."

am: 82b67fff

Change-Id: I6f2e72a4847fbfac8e1ba78321be7e026f7629bd
parents 559cc01e 82b67fff
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;