aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib9/pipe.c')
-rw-r--r--src/lib9/pipe.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib9/pipe.c b/src/lib9/pipe.c
new file mode 100644
index 00000000..f9fe2420
--- /dev/null
+++ b/src/lib9/pipe.c
@@ -0,0 +1,10 @@
+#include <u.h>
+#define NOPLAN9DEFINES
+#include <libc.h>
+#include <sys/socket.h>
+
+int
+p9pipe(int fd[2])
+{
+ return socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
+}