klibc-bot for H. Peter Anvin
2012-May-21 22:30 UTC
[klibc] [klibc:master] Add pipe2() system call
Commit-ID: ded7408767c5c2b1d21386efff594bf369380fa8 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=ded7408767c5c2b1d21386efff594bf369380fa8 Author: H. Peter Anvin <hpa at zytor.com> AuthorDate: Mon, 21 May 2012 15:22:51 -0700 Committer: H. Peter Anvin <hpa at zytor.com> CommitDate: Mon, 21 May 2012 15:22:51 -0700 [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 at zytor.com> --- usr/include/unistd.h | 1 + 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 3244e21..3af4c8f 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 5fd2753..d935a92 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 *);