diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-09-08 20:22:08 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-09-08 20:22:08 -0400 |
commit | 6cf8bfdb646efaf76c75a95d1ea0cd254706c037 (patch) | |
tree | bc640847a316bb36ba69d81cc2b5230f55f905f0 /src/linux/dup3.c | |
parent | b10d0230c1837be34e4ece7d6b11d19f1b578b9f (diff) | |
download | musl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.tar.gz musl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.tar.bz2 musl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.tar.xz musl-6cf8bfdb646efaf76c75a95d1ea0cd254706c037.zip |
add acct, accept4, setns, and dup3 syscalls (linux extensions)
based on patch by Justin Cormack
Diffstat (limited to 'src/linux/dup3.c')
-rw-r--r-- | src/linux/dup3.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/linux/dup3.c b/src/linux/dup3.c new file mode 100644 index 00000000..e201ef01 --- /dev/null +++ b/src/linux/dup3.c @@ -0,0 +1,10 @@ +#define _GNU_SOURCE +#include <unistd.h> +#include <errno.h> +#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); +} |