diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-05-21 15:22:51 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-05-21 15:22:51 -0700 |
commit | ded7408767c5c2b1d21386efff594bf369380fa8 (patch) | |
tree | d70c4112a471c94d30d6e9b18928478cf2ca357f | |
parent | 5203298c5af47a7aaaa91c4d738463be62fd5ab4 (diff) | |
download | klibc-ded7408767c5c2b1d21386efff594bf369380fa8.tar.gz |
[klibc] Add pipe2() system call
pipe2() is like pipe() except we can set the O_CLOEXEC flag via a
second argument. Unlike pipe(), noone seems to have seemed fit to
create a completely ad hoc calling convention for pipe2(), so we can
just define it in one simple place. Thank goodness.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | usr/include/unistd.h | 1 | ||||
-rw-r--r-- | usr/klibc/SYSCALLS.def | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/usr/include/unistd.h b/usr/include/unistd.h index 3244e21c34e1c..3af4c8f16dacb 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -71,6 +71,7 @@ __extern int mkdir(const char *, mode_t); __extern int mkdirat(int, const char *, const char *, mode_t); __extern int rmdir(const char *); __extern int pipe(int *); +__extern int pipe2(int *, int); __extern int chroot(const char *); __extern int symlink(const char *, const char *); __extern int symlinkat(int, const char *, const char *); diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index 5fd2753265331..d935a92bcb63b 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -124,6 +124,7 @@ int mkdir(const char *, mode_t); <?> int mkdirat(int, const char *, const char *, mode_t); int rmdir(const char *); <!alpha,ia64,mips,mips64,sh,sparc,sparc64> int pipe(int *); +int pipe2(int *, int); mode_t umask(mode_t); int chroot(const char *); int symlink(const char *, const char *); |