Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
.TH PIPE 3 
2
.SH NAME
3
pipe \- two-way interprocess communication
4
.SH SYNOPSIS
5
.B bind #|
6
.I dir
7
.nf
8
 
9
.IB dir /data
10
.IB dir /data1
11
.fi
12
.SH DESCRIPTION
13
.PP
14
An
15
.IR attach (5)
16
of this device allocates two new cross-connected I/O streams,
17
.IB dir /data
18
and
19
.IB dir /data1\f1.
20
.PP
21
Data written to one channel becomes available for reading at
22
the other.
23
Write boundaries are preserved: each read terminates
24
when the read buffer is full or after reading the last byte
25
of a write, whichever comes first.
26
.PP
27
Writes are atomic up to a certain size, typically 32768 bytes,
28
that is, each write will be delivered in a single read by the
29
recipient, provided the receiving buffer is large enough.
30
.PP
31
If there are multiple writers, each
32
.I write
33
is guaranteed to be available in a contiguous piece at the other
34
end of the pipe.
35
If there are multiple readers, each read will return data from only
36
one write.
37
.PP
38
The
39
.IR pipe (2)
40
system call performs an
41
.I attach
42
of this device and returns file descriptors to the new pipe's
43
.B data
44
and
45
.B data1
46
files.
47
The files are open with mode
48
.BR ORDWR .
49
.SH "SEE ALSO"
50
.IR pipe (2)
51
.SH SOURCE
52
.B /sys/src/9/port/devpipe.c