mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/nsenter: set FD_CLOEXEC on received fd
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
committed by
Aleksa Sarai
parent
8f67178139
commit
3b191ff710
@@ -30,7 +30,7 @@ int receive_fd(int sockfd)
|
||||
|
||||
memset(msg.msg_control, 0, msg.msg_controllen);
|
||||
|
||||
bytes_read = recvmsg(sockfd, &msg, 0);
|
||||
bytes_read = recvmsg(sockfd, &msg, MSG_CMSG_CLOEXEC);
|
||||
if (bytes_read != 1)
|
||||
bail("failed to receive fd from unix socket %d", sockfd);
|
||||
if (msg.msg_flags & MSG_CTRUNC)
|
||||
|
||||
Reference in New Issue
Block a user