|
Hopefully, this page is exactly what you are looking for, but if not, you can always find further assistance on Unix/Linux Forum!
System Calls pipe(2)
NAME
pipe - create an interprocess channel
SYNOPSIS
#include <unistd.h>
int pipe(int fildes[2]);
DESCRIPTION
The pipe() function creates an I/O mechanism called a pipe
and returns two file descriptors, fildes[0] and fildes[1].
The files associated with fildes[0] and fildes[1] are
streams and are both opened for reading and writing. The
O_NDELAY, O_NONBLOCK, and FD_CLOEXEC flags are cleared on
both file descriptors. The fcntl(2) function can be used to
set these flags.
A read from fildes[0] accesses the data written to fildes[1]
on a first-in-first-out (FIFO) basis and a read from
fildes[1] accesses the data written to fildes[0] also on a
FIFO basis.
Upon successful completion pipe() marks for update the
st_atime, st_ctime, and st_mtime fields of the pipe.
RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is
returned and errno is set to indicate the error.
ERRORS
The pipe() function will fail if:
EMFILE More than {OPEN_MAX} file descriptors are
already in use by this process.
ENFILE The number of simultaneously open files in
the system would exceed a system-imposed
limit.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.10 Last change: 23 Apr 2002 1
System Calls pipe(2)
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Interface Stability | Standard |
|_____________________________|_____________________________|
| MT-Level | Async-Signal-Safe |
|_____________________________|_____________________________|
SEE ALSO
sh(1), fcntl(2), fstat(2), getmsg(2), poll(2), putmsg(2),
read(2), write(2), attributes(5), standards(5), streamio(7I)
NOTES
Since a pipe is bi-directional, there are two separate flows
of data. Therefore, the size (st_size) returned by a call to
fstat(2) with argument fildes[0] or fildes[1] is the number
of bytes available for reading from fildes[0] or fildes[1]
respectively. Previously, the size (st_size) returned by a
call to fstat() with argument fildes[1] (the write-end) was
the number of bytes available for reading from fildes[0]
(the read-end).
SunOS 5.10 Last change: 23 Apr 2002 2
Man(1) output converted with
man2html and wrapped by fishsponge
This page was generated on Wed Sep 12 11:27:04 GMT 2007
|
Your favourite pages:
No pages logged yet. Trying to save cookie... Top 10 most popular pages:
sqlite3 man page (4764 hits) (openSUSE 10.2)
adv_cap_autoneg man page (4617 hits) (Solaris 10 11_06)
CPAN man page (4352 hits) (Suse Linux 10.1)
ssh man page (4196 hits) (Suse Linux 10.1)
svn man page (3410 hits) (FreeBSD 6.2)
startproc man page (1957 hits) (Suse Linux 10.1)
pprosetup man page (1745 hits) (Solaris 10 11_06)
netcat man page (1697 hits) (Suse Linux 10.1)
signal man page (1686 hits) (Suse Linux 10.1)
ssh-socks5-proxy-connect man page (1661 hits) (Solaris 10 11_06)
|