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

Commit 564e802a authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "LocalSocketImpl.cpp: Set O_CLOEXEC on received FDs" am: 9156ccdb am:...

Merge "LocalSocketImpl.cpp: Set O_CLOEXEC on received FDs" am: 9156ccdb am: 4400fb5b am: 7099984f
am: 5a35ec90

Change-Id: Ia485c5cadc25a3e83a881132faacd6a0be104877
parents d837ed2c 5a35ec90
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -202,9 +202,7 @@ static ssize_t socket_read_all(JNIEnv *env, jobject thisJ, int fd,
    msg.msg_control = cmsgbuf;
    msg.msg_controllen = sizeof(cmsgbuf);

    do {
        ret = recvmsg(fd, &msg, MSG_NOSIGNAL);
    } while (ret < 0 && errno == EINTR);
    ret = TEMP_FAILURE_RETRY(recvmsg(fd, &msg, MSG_NOSIGNAL | MSG_CMSG_CLOEXEC));

    if (ret < 0 && errno == EPIPE) {
        // Treat this as an end of stream