SYNOPSIS
#include <unistd.h>
int pipe(int fildes[2]);
DESCRIPTION
The
Data can be written to the file descriptor fildes[1] and read from the file descriptor fildes[0]. A read on the file descriptor fildes[0] accesses data written to file descriptor fildes[1] on a first-in-first-out basis.
A process has the pipe open for reading if it has a file descriptor open that refers to the read end, fildes[0]. Correspondingly, a process has the pipe open for writing if it has a file descriptor open that refers to the write end, fildes[1].
Upon successful completion,
PARAMETERS
RETURN VALUES
If successful,
- EFAULT
-
The fildes parameter is not a valid pointer.
- EMFILE
-
This process is already using more than OPEN_MAX-2 file descriptors.
- ENFILE
-
The number of simultaneously open files in the system exceeds a system-imposed limit.
CONFORMANCE
POSIX.1 (1996).
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
Unlike some UNIX implementations, Windows only supports unidirectional pipes.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.