PIPE(S) UNIX System V PIPE(S)
Name
pipe - create an interprocess channel
Syntax
int pipe (fildes)
int fildes[2];
Description
The pipe system call creates an I/O mechanism called a pipe
and returns two file descriptors, fildes[0] and fildes[1].
fildes[0] is opened for reading and fildes[1] is opened for
writing.
Up to 5120 bytes of data are buffered by the pipe before the
writing process is blocked. A read-only file descriptor
fildes[0] accesses the data written to fildes[1] on a
first-in-first-out (FIFO) basis.
The pipe system call will fail if:
[EMFILE] The current process has reached the limit of
open files.
[ENFILE] The system file table is full.
See Also
read(S), write(S), sh(C)
Diagnostics
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned, and errno is set to
indicate the error.
Standards Conformance
pipe is conformant with:
AT&T SVID Issue 2, Select Code 307-127;
The X/Open Portability Guide II of January 1987;
IEEE POSIX Std 1003.1-1988 with C Standard Language-
Dependent System Support;
and NIST FIPS 151-1.
(printed 6/20/89)