hurd: Don't pass FD_CLOEXEC in CMSG_DATA
commit0822e3552a787dd6ae352c3eb65783dfed2f4238
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 24 Apr 2023 21:05:15 +0000 (24 23:05 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 24 Apr 2023 21:05:15 +0000 (24 23:05 +0200)
tree69512a6911b4550b4a08216196761338cb4195dc
parentc02b26455b3c9d33c8a94e56eed1958d7f751b72
hurd: Don't pass FD_CLOEXEC in CMSG_DATA

The flags are used by _hurd_intern_fd, which takes O_* flags, not FD_*.

Also, it is of no concern to the receiving process whether or not
the sender process wants to close its copy of sent file descriptor
upon exec, and it should not influence whether or not the received
file descriptor gets the FD_CLOEXEC flag set in the receiving process.

The latter should in fact be dependent on the MSG_CMSG_CLOEXEC flag
being passed to the recvmsg () call, which is going to be implemented
in the following commit.

Fixes 344e755248ce02c0f8d095d11cc49e340703d926
"hurd: Support sending file descriptors over Unix sockets"

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
sysdeps/mach/hurd/sendmsg.c