52 lines · 1.1 KB · Text
RawDownload
.TH PIPE 3 .SH NAMEpipe \- two-way interprocess communication.SH SYNOPSIS.B bind #|.I dir.nf .IB dir /data.IB dir /data1.fi.SH DESCRIPTION.PPAn.IR attach (5)of this device allocates two new cross-connected I/O streams,.IB dir /dataand.IB dir /data1\f1..PPData written to one channel becomes available for reading atthe other.Write boundaries are preserved: each read terminateswhen the read buffer is full or after reading the last byteof a write, whichever comes first..PPWrites are atomic up to a certain size, typically 32768 bytes,that is, each write will be delivered in a single read by therecipient, provided the receiving buffer is large enough..PPIf there are multiple writers, each.I writeis guaranteed to be available in a contiguous piece at the otherend of the pipe.If there are multiple readers, each read will return data from onlyone write..PPThe.IR pipe (2)system call performs an.I attachof this device and returns file descriptors to the new pipe's.B dataand.B data1files.The files are open with mode.BR ORDWR ..SH "SEE ALSO".IR pipe (2).SH SOURCE.B /sys/src/9/port/devpipe.c