6 int dup2(int old
, int new)
10 while ((r
=__syscall(SYS_dup2
, old
, new))==-EBUSY
);
13 r
= __syscall(SYS_fcntl
, old
, F_GETFD
);
14 if (r
>= 0) return old
;
16 while ((r
=__syscall(SYS_dup3
, old
, new, 0))==-EBUSY
);
19 return __syscall_ret(r
);