PIPE(2) Linux Programmer's Manual PIPE(2)

pipe - create pipe

#include <unistd.h>

int pipe(int filedes[2]);

pipe() creates a pair of file descriptors, pointing to a pipe inode, and places them in the array pointed to by filedes. filedes[0] is for reading, filedes[1] is for writing.

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

filedes is not valid.
Too many file descriptors are in use by the process.
The system limit on the total number of open files has been reached.

POSIX.1

fork(2), read(2), socketpair(2), write(2)

2004-06-17 Linux 2.6.7

Different Versions of this Page: