blob: 01b244ef61434728657aa4b68ced75f51612b0da [file] [log] [blame]
rscb3994ec2003-12-11 17:50:28 +00001#include <u.h>
2#define NOPLAN9DEFINES
3#include <libc.h>
4#include <sys/socket.h>
5
rsc2277c5d2004-03-21 04:33:13 +00006/*
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 */
rscb3994ec2003-12-11 17:50:28 +000011int
12p9pipe(int fd[2])
13{
rscc91bd322004-03-05 02:25:41 +000014 return socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
rscb3994ec2003-12-11 17:50:28 +000015}