HomeFreeBSD

Partial MFC of r248534: Implement SOCK_CLOEXEC and SOCK_NONBLOCK in kernel.
rS255299Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Partial MFC of r248534: Implement SOCK_CLOEXEC and SOCK_NONBLOCK in kernel.

SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and socketpair()'s
type parameter.

The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.

The SOCK_* flags are not passed to MAC because this may cause incorrect
failures and can be done later via fcntl() anyway. On the other hand, audit
is expected to cope with the new flags.

This commit does not add the constants to <sys/socket.h> as in r248534
because this would lead to various newly compiled software not working on
old kernels. It only serves to help 10.x binaries and prepare for a possible
full MFC (if third-party software starts to insist on SOCK_CLOEXEC and
SOCK_NONBLOCK).

MSG_CMSG_CLOEXEC from r248534 is not merged here because it changes a
KPI/KBI.

No mergeinfo because the rest of r248534 is missing.

Details

Provenance
jillesAuthored on
Parents
rS255298: Use Makefile.inc instead of .export.
Branches
Unknown
Tags
Unknown

Event Timeline