Unix and Linux Discussions Tagged with pipe |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
9 |
118,771 |
Shell Programming and Scripting |
|
|
|
2 |
10,382 |
Shell Programming and Scripting |
|
|
|
1 |
9,586 |
Shell Programming and Scripting |
|
|
|
6 |
3,760 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,168 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
2,322 |
UNIX for Beginners Questions & Answers |
|
|
|
13 |
3,989 |
Shell Programming and Scripting |
|
|
|
2 |
3,761 |
Programming |
|
|
|
8 |
8,172 |
Shell Programming and Scripting |
|
|
|
8 |
4,523 |
Shell Programming and Scripting |
|
|
|
3 |
2,159 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
2,245 |
Shell Programming and Scripting |
|
|
|
2 |
12,939 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,478 |
Shell Programming and Scripting |
|
|
|
3 |
2,753 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
4,663 |
Solaris |
|
|
|
0 |
3,949 |
Homework & Coursework Questions |
|
|
|
2 |
2,033 |
Shell Programming and Scripting |
|
|
|
5 |
3,305 |
Linux |
|
|
|
2 |
1,681 |
Shell Programming and Scripting |
|
|
|
1 |
2,776 |
Shell Programming and Scripting |
|
|
|
3 |
2,369 |
Shell Programming and Scripting |
|
|
|
3 |
5,645 |
Shell Programming and Scripting |
|
|
|
10 |
4,826 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,838 |
Shell Programming and Scripting |
|
|
|
3 |
2,185 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,972 |
Shell Programming and Scripting |
|
|
|
1 |
2,911 |
UNIX for Dummies Questions & Answers |
|
|
|
16 |
8,139 |
Programming |
|
|
|
8 |
21,132 |
Shell Programming and Scripting |
|
|
|
9 |
8,428 |
Shell Programming and Scripting |
|
|
|
1 |
5,016 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
3,747 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,639 |
Programming |
|
|
|
6 |
5,667 |
Ubuntu |
|
|
|
1 |
3,563 |
Ubuntu |
|
|
|
1 |
19,848 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
19,160 |
Shell Programming and Scripting |
|
|
|
7 |
7,130 |
Shell Programming and Scripting |
|
|
|
3 |
10,263 |
Shell Programming and Scripting |
io_pipe(3) Library Functions Manual io_pipe(3)
NAME
io_pipe - create a Unix pipe
SYNTAX
#include <io.h>
int io_pipe(int64 pfd[2]);
DESCRIPTION
io_pipe creates a new UNIX ``pipe.'' The pipe can receive data and provide data; any bytes written to the pipe can then be read from the
pipe in the same order.
A pipe is typically stored in an 8192-byte memory buffer; the exact number depends on the UNIX kernel. Bytes are written to the end of the
buffer and read from the beginning of the buffer. Once a byte has been read, it is eliminated from the buffer, making space for another
byte to be written; readers cannot ``rewind'' a pipe to read old data. Once 8192 bytes have been written to the buffer, the pipe will not
be ready for further writing until some of the bytes have been read. Once all the bytes written have been read, the pipe will not be ready
for further reading until more bytes are written.
io_pipe sets d[0] to the number of a new descriptor reading from the pipe, and sets d[1] to the number of a new descriptor writing to the
pipe. It then returns 1 to indicate success. If something goes wrong, io_pipe returns 0, setting errno to indicate the error; in this case
it frees any memory that it allocated for the new pipe, and it leaves d alone.
SEE ALSO
io_readfile(3), io_createfile(3), io_socketpair(3)
io_pipe(3)