projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
move accept4, dup3, and pipe2 to non-linux-specific locations
[musl]
/
src
/
unistd
/
dup3.c
diff --git a/src/unistd/dup3.c
b/src/unistd/dup3.c
new file mode 100644
(file)
index 0000000..
18f6fcc
--- /dev/null
+++ b/
src/unistd/dup3.c
@@ -0,0
+1,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);
+}