about summary refs log tree commit diff
path: root/src/linux/dup3.c
blob: e201ef01574c07652900ee7bfb4354d482c88978 (plain) (blame)
1
2
3
4
5
6
7
8
9
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);
}