Add pipe2() system call.
authorjilles <jilles@FreeBSD.org>
Wed, 1 May 2013 22:42:42 +0000 (22:42 +0000)
committerjilles <jilles@FreeBSD.org>
Wed, 1 May 2013 22:42:42 +0000 (22:42 +0000)
commit16772c421df1aaea1f268ea43b53e1b21a40be99
tree69471087fd1663f8e867f7e487ae78525a10941b
parenta7b320131e8beb106b450826aa74a2797328cd8b
Add pipe2() system call.

The pipe2() function is similar to pipe() but allows setting FD_CLOEXEC and
O_NONBLOCK (on both sides) as part of the function.

If p points to two writable ints, pipe2(p, 0) is equivalent to pipe(p).

If the pointer is not valid, behaviour differs: pipe2() writes into the
array from the kernel like socketpair() does, while pipe() writes into the
array from an architecture-specific assembler wrapper.

Reviewed by: kan, kib
include/unistd.h
lib/libc/sys/Makefile.inc
lib/libc/sys/Symbol.map
lib/libc/sys/pipe.2
sys/compat/freebsd32/syscalls.master
sys/kern/capabilities.conf
sys/kern/sys_pipe.c
sys/kern/syscalls.master