summaryrefslogblamecommitdiff
path: root/src/unistd/dup2.c
blob: 87a0d44538eb49162bf4d26824b0d35de19af0fb (plain) (tree)
1
2
3
4
5
6
7
8
9
                   
                  



                          


                                                          
 
#include <unistd.h>
#include <errno.h>
#include "syscall.h"

int dup2(int old, int new)
{
	int r;
	while ((r=__syscall(SYS_dup2, old, new))==-EBUSY);
	return __syscall_ret(r);
}