pipe(2)
_________________________________________________________________
pipe System Call
Create an interprocess channel.
_________________________________________________________________
SYNTAX
int pipe (fildes)
int fildes[2];
PARAMETERS
fildes Address of an array of two file descriptors.
DESCRIPTION
Pipe creates an I/O mechanism called a pipe that allows data to
be written and read in a first-in-first-out (FIFO) manner.
<Fildes[]> is an array of two file descriptors. After the pipe
is created and opened, a read-only file descriptor is returned in
<fildes[0]> and a write-only descriptor is returned in
<fildes[1]>.
If the process exceeds its limit for open files, the call will
fail.
Pipes exist in the channel store, but not in the file name store
or the flat file store. Pipes have no file attributes, except:
time-last-accessed, time-last-changed, time-last-modifed, and
size.
ACCESS CONTROL
None.
RETURN VALUE
0 The pipe was successfully created.
-1 An error occurred. Errno is set to indicate the
error.
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
pipe(2)
EXCEPTIONS
Errno may be set to one of the following error codes:
EFAULT The <fildes[]> buffer is an invalid area of the
process's address space.
EMFILE Pipe will fail if NOFILE-1 or more file
descriptors are currently open.
ENFILE The system file table is full.
SEE ALSO
The related manual sections: sh(1),
fork(2), read(2), readv(2), write(2), writev(2).
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)