[klibc] [klibc:master] Add dup3() system call
klibc-bot for H. Peter Anvin
hpa at zytor.com
Mon May 21 15:30:03 PDT 2012
Commit-ID: 5203298c5af47a7aaaa91c4d738463be62fd5ab4
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=5203298c5af47a7aaaa91c4d738463be62fd5ab4
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 21 May 2012 15:18:58 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 21 May 2012 15:18:58 -0700
[klibc] Add dup3() system call
The dup3() system call allows a file descriptor to be duped with the
O_CLOEXEC flag set.
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 3eaeaee..3244e21 100644
--- a/usr/include/unistd.h
+++ b/usr/include/unistd.h
@@ -103,6 +103,7 @@ __extern ssize_t pwrite(int, const void *, size_t, off_t);
__extern int dup(int);
__extern int dup2(int, int);
+__extern int dup3(int, int, int);
__extern int fcntl(int, int, ...);
__extern int ioctl(int, int, void *);
__extern int ftruncate(int, off_t);
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 35bcdcf..5fd2753 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -165,6 +165,7 @@ int close(int);
<32> int _llseek::__llseek(int, unsigned long, unsigned long, off_t *, int);
int dup(int);
int dup2(int, int);
+int dup3(int, int, int);
<i386> int fcntl64 at varadic::fcntl(int, int, unsigned long);
<ppc64> int fcntl(int, int, unsigned long);
<!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long);
More information about the klibc
mailing list