Introduction
Introduction Statistics Contact Development Disclaimer Help
pipe.c - 9base - revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log
Files
Refs
README
LICENSE
---
pipe.c (320B)
---
1 #include <u.h>
2 #define NOPLAN9DEFINES
3 #include <libc.h>
4 #include <sys/socket.h>
5
6 /*
7 * We use socketpair to get a two-way pipe.
8 * The pipe still doesn't preserve message boundaries.
9 * Worse, it cannot be reopened via /dev/fd/NNN on Linux.
10 */
11 int
12 p9pipe(int fd[2])
13 {
14 return socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
15 }
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.