summaryrefslogtreecommitdiff
path: root/lang/modula-3-socks/files/dup2.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lang/modula-3-socks/files/dup2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/modula-3-socks/files/dup2.c b/lang/modula-3-socks/files/dup2.c
new file mode 100644
index 000000000000..582d570695e1
--- /dev/null
+++ b/lang/modula-3-socks/files/dup2.c
@@ -0,0 +1,13 @@
+#include "wrap.h"
+#include <unistd.h>
+
+int
+m3_dup2(int oldd, int newd)
+{
+ int result;
+
+ ENTER_CRITICAL;
+ result = dup2(oldd, newd);
+ EXIT_CRITICAL;
+ return result;
+}