32 lines
515 B
Groff
32 lines
515 B
Groff
.TH PIPE 2
|
|
.UC 4
|
|
.SH NAME
|
|
pipe \- create pipe
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B #include <unistd.h>
|
|
.B int pipe (int *filedes)
|
|
.fi
|
|
.SH DESCRIPTION
|
|
.B pipe()
|
|
creates a pair of file descriptors,
|
|
pointing to a pipe inode,
|
|
and places them in the array pointed to by
|
|
.I filedes.
|
|
.I filedes[0]
|
|
is for reading,
|
|
.I filedes[1]
|
|
is for writing.
|
|
0 is returned on success, -1 is returned on failure.
|
|
.SH FILES
|
|
linux/fs/pipe.c
|
|
.br
|
|
/usr/include/linux/sys.h
|
|
.br
|
|
/usr/include/unistd.h
|
|
.SH SEE ALSO
|
|
fork(2)
|
|
.SH BUGS
|
|
-1 is returned for error.
|
|
|