2003-12-11 17:50:28 +00:00
|
|
|
#include <u.h>
|
|
|
|
|
#define NOPLAN9DEFINES
|
|
|
|
|
#include <libc.h>
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
2004-03-21 04:33:13 +00:00
|
|
|
/*
|
|
|
|
|
* We use socketpair to get a two-way pipe.
|
|
|
|
|
* The pipe still doesn't preserve message boundaries.
|
|
|
|
|
* Worse, it cannot be reopened via /dev/fd/NNN on Linux.
|
|
|
|
|
*/
|
2003-12-11 17:50:28 +00:00
|
|
|
int
|
|
|
|
|
p9pipe(int fd[2])
|
|
|
|
|
{
|
2004-03-05 02:25:41 +00:00
|
|
|
return socketpair(AF_UNIX, SOCK_STREAM, 0, fd);
|
2003-12-11 17:50:28 +00:00
|
|
|
}
|