Skip to content
Commit 904b94c0 authored by Sergey Bugaev's avatar Sergey Bugaev Committed by Samuel Thibault
Browse files

socket: Add a test for MSG_CMSG_CLOEXEC



This checks that:
* We can send and receive fds over Unix domain sockets using SCM_RIGHTS;
* msg_controllen, cmsg_level, cmsg_type, cmsg_len are all filled in
  correctly on receive;
* Most importantly, the received fd has or has not the close-on-exec
  flag set depending on whether we pass MSG_CMSG_CLOEXEC to recvmsg ().

Checked on i686-gnu and x86_64-linux-gnu.

Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: default avatarSergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230423160548.126576-4-bugaevc@gmail.com>
parent 323fe6a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment