.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)pipe.2 6.3 (Berkeley) %G%
pipe \- create an interprocess communication channel
creates an I/O mechanism called a pipe.
The file descriptors returned can
be used in read and write operations.
When the pipe is written using the descriptor
up to 4096 bytes of data are buffered
before the writing process is suspended.
A read using the descriptor
It is assumed that after the
will pass data through the
to set up a linear array of processes
pipe (no buffered data) with only one end
(all write file descriptors closed)
Pipes are really a special case of the
call and, in fact, are implemented as such in the system.
A signal is generated if a write on a pipe with only one end is attempted.
The function value zero is returned if the
pipe was created; \-1 if an error occurred.
The \fIpipe\fP call will fail if:
Too many descriptors are active.
The system file table is full.
The \fIfildes\fP buffer is in an invalid area of the process's address
sh(1), read(2), write(2), fork(2), socketpair(2)
Should more than 4096 bytes be necessary in any
pipe among a loop of processes, deadlock will occur.