e201ef01574c07652900ee7bfb4354d482c88978
[musl] / src / linux / dup3.c
1 #define _GNU_SOURCE
2 #include <unistd.h>
3 #include <errno.h>
4 #include "syscall.h"
5
6 int dup3(int old, int new, int flags) {
7         int r;
8         while ((r=__syscall(SYS_dup3, old, new, flags))==-EBUSY);
9         return __syscall_ret(r);
10 }