freebsd-dev/lib/libc
Jilles Tjoelker c2e3c52e0d Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC.
This change allows creating file descriptors with close-on-exec set in some
situations. SOCK_CLOEXEC and SOCK_NONBLOCK can be OR'ed in socket() and
socketpair()'s type parameter, and MSG_CMSG_CLOEXEC to recvmsg() makes file
descriptors (SCM_RIGHTS) atomically close-on-exec.

The numerical values for SOCK_CLOEXEC and SOCK_NONBLOCK are as in NetBSD.
MSG_CMSG_CLOEXEC is the first free bit for MSG_*.

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.

For MSG_CMSG_CLOEXEC, unp_externalize() is extended to take a flags
argument.

Reviewed by:	kib
2013-03-19 20:58:17 +00:00
..
amd64 Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
arm When clang builds libc it may insert calls to __aeabi_* functions. Normally 2013-02-12 06:04:51 +00:00
compat-43 Update the kill(2) and killpg(2) man pages to the modern permission 2012-10-22 03:37:00 +00:00
db Globally replace u_int*_t from (non-contributed) man pages. 2012-02-12 18:29:56 +00:00
gdtoa Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
gen Update to the latest (un)vis(3) sources from NetBSD. This adds 2013-03-14 23:51:47 +00:00
gmon mdoc: end list context with El. 2012-05-12 07:52:45 +00:00
i386 Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
ia64 Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
iconv libc/iconv: Fix race condition with setting FD_CLOEXEC. 2012-12-17 10:38:51 +00:00
include Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
inet A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
isc A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
locale libc: Make various internal file descriptors close-on-exec. 2012-12-11 22:52:56 +00:00
mips Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
nameser A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
net libc: Avoid SIGPIPE when nscd closes the connection unexpectedly. 2013-03-13 18:38:18 +00:00
nls Add derived versions for common Simplified Chinese encodings. 2012-12-28 01:23:12 +00:00
posix1e Minor mdoc nits. 2012-05-13 14:16:04 +00:00
powerpc Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
powerpc64 Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
quad For ARM EABI we only need a subset of the quad functions, the rest are 2013-01-19 02:33:57 +00:00
regex Fix assignment of maximum bounadary. 2013-03-01 23:26:13 +00:00
resolv Remove meaningless self-assignment in res_send.c, otherwise clang will 2011-12-15 20:10:12 +00:00
rpc Assign the len field of the netbuf structure to the current length of 2013-03-01 15:45:57 +00:00
softfloat Conditionalize the __floatunsisf and __floatunsidf functions, added in 2012-01-20 14:44:21 +00:00
sparc64 Rework the __vdso_* symbols attributes to only make the symbols weak, 2013-01-30 12:48:16 +00:00
stdio mdoc: add missing El. 2013-02-27 20:09:25 +00:00
stdlib Add restrict keyword to realpath manpage. 2013-03-18 01:22:28 +00:00
stdtime Add more locale-specific functions to the relevant man pages and 2012-06-25 21:51:40 +00:00
string Create a symlink from strchrnul.3 to strchr.3. 2013-03-06 19:59:42 +00:00
sys Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. 2013-03-19 20:58:17 +00:00
uuid Note that memory should be freed after uuid_to_string(3) call. 2012-03-01 14:39:01 +00:00
xdr Add a HISTORY section 2011-07-10 06:57:00 +00:00
yp libc: Use O_CLOEXEC for various internal file descriptors. 2012-09-29 11:54:34 +00:00
Makefile Disable NLS catalog use in libc if built with WITHOUT_NLS option. 2012-05-21 08:10:42 +00:00
Versions.def Add a FBSD_1.3 namespace for FreeBSD 10. 2011-10-10 15:42:33 +00:00