From dc62790deec183697489d5fddea03c82f725e7fd Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 29 Sep 2012 17:40:42 -0400 Subject: move accept4, dup3, and pipe2 to non-linux-specific locations these interfaces have been adopted by the Austin Group for inclusion in the next version of POSIX. --- src/unistd/dup3.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/unistd/dup3.c (limited to 'src/unistd/dup3.c') diff --git a/src/unistd/dup3.c b/src/unistd/dup3.c new file mode 100644 index 00000000..18f6fcce --- /dev/null +++ b/src/unistd/dup3.c @@ -0,0 +1,10 @@ +#define _GNU_SOURCE +#include +#include +#include "syscall.h" + +int dup3(int old, int new, int flags) { + int r; + while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY); + return __syscall_ret(r); +} -- cgit v1.2.1