diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-05-01 22:42:42 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2013-05-01 22:42:42 +0000 |
commit | dc570d5e563382f8f29248e6e5ecf8b8cb3887ed (patch) | |
tree | 69471087fd1663f8e867f7e487ae78525a10941b /include/unistd.h | |
parent | af3ed447c508ea85b6b88632b508b0da5c4ed005 (diff) | |
download | src-test-dc570d5e563382f8f29248e6e5ecf8b8cb3887ed.tar.gz src-test-dc570d5e563382f8f29248e6e5ecf8b8cb3887ed.zip |
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
Notes
Notes:
svn path=/head/; revision=250159
Diffstat (limited to 'include/unistd.h')
-rw-r--r-- | include/unistd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h index dabf1780c4553..9df07774c9112 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -533,6 +533,7 @@ char *mktemp(char *); #endif int nfssvc(int, void *); int nlm_syscall(int, int, int, char **); +int pipe2(int *, int); int profil(char *, size_t, vm_offset_t, int); int rcmd(char **, int, const char *, const char *, const char *, int *); int rcmd_af(char **, int, const char *, |