~ubuntu-branches/ubuntu/hardy/9base/hardy

« back to all changes in this revision

Viewing changes to lib9/pipe.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2006-01-25 15:33:00 UTC
  • Revision ID: james.westby@ubuntu.com-20060125153300-6hh4p9wx8iqqply5
Tags: upstream-2
ImportĀ upstreamĀ versionĀ 2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}