Merge "LocalSocketImpl.cpp: Set O_CLOEXEC on received FDs" am: 9156ccdbb4 am: 4400fb5bed
am: 7099984f4c
Change-Id: Ie88a0c43d9426c12319cc942015838e46d0bb8a1
This commit is contained in:
@@ -202,9 +202,7 @@ static ssize_t socket_read_all(JNIEnv *env, jobject thisJ, int fd,
|
|||||||
msg.msg_control = cmsgbuf;
|
msg.msg_control = cmsgbuf;
|
||||||
msg.msg_controllen = sizeof(cmsgbuf);
|
msg.msg_controllen = sizeof(cmsgbuf);
|
||||||
|
|
||||||
do {
|
ret = TEMP_FAILURE_RETRY(recvmsg(fd, &msg, MSG_NOSIGNAL | MSG_CMSG_CLOEXEC));
|
||||||
ret = recvmsg(fd, &msg, MSG_NOSIGNAL);
|
|
||||||
} while (ret < 0 && errno == EINTR);
|
|
||||||
|
|
||||||
if (ret < 0 && errno == EPIPE) {
|
if (ret < 0 && errno == EPIPE) {
|
||||||
// Treat this as an end of stream
|
// Treat this as an end of stream
|
||||||
|
|||||||
Reference in New Issue
Block a user