X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Funistd%2Fdup2.c;h=87a0d44538eb49162bf4d26824b0d35de19af0fb;hp=7945f853cae600b317ebab09306c4a8df1d06aa4;hb=743546a9339d3da4304fd63f74872e90ac792f63;hpb=aa398f56fa398f2202b04e82c67f822f3233786f diff --git a/src/unistd/dup2.c b/src/unistd/dup2.c index 7945f853..87a0d445 100644 --- a/src/unistd/dup2.c +++ b/src/unistd/dup2.c @@ -1,7 +1,10 @@ #include +#include #include "syscall.h" int dup2(int old, int new) { - return syscall(SYS_dup2, old, new); + int r; + while ((r=__syscall(SYS_dup2, old, new))==-EBUSY); + return __syscall_ret(r); }