Unix and Linux Discussions Tagged with pipe |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
9 |
105,022 |
Shell Programming and Scripting |
|
|
|
2 |
8,808 |
Shell Programming and Scripting |
|
|
|
1 |
8,485 |
Shell Programming and Scripting |
|
|
|
6 |
2,619 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
1,985 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
1,538 |
UNIX for Beginners Questions & Answers |
|
|
|
13 |
3,174 |
Shell Programming and Scripting |
|
|
|
2 |
2,994 |
Programming |
|
|
|
8 |
6,549 |
Shell Programming and Scripting |
|
|
|
8 |
3,670 |
Shell Programming and Scripting |
|
|
|
3 |
1,504 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
1,720 |
Shell Programming and Scripting |
|
|
|
2 |
11,976 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,596 |
Shell Programming and Scripting |
|
|
|
3 |
1,953 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
4,221 |
Solaris |
|
|
|
0 |
2,763 |
Homework & Coursework Questions |
|
|
|
2 |
1,748 |
Shell Programming and Scripting |
|
|
|
5 |
2,510 |
Linux |
|
|
|
2 |
1,325 |
Shell Programming and Scripting |
|
|
|
1 |
2,382 |
Shell Programming and Scripting |
|
|
|
3 |
2,013 |
Shell Programming and Scripting |
|
|
|
3 |
5,200 |
Shell Programming and Scripting |
|
|
|
10 |
4,059 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
2,388 |
Shell Programming and Scripting |
|
|
|
3 |
1,780 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
4,413 |
Shell Programming and Scripting |
|
|
|
1 |
2,442 |
UNIX for Dummies Questions & Answers |
|
|
|
16 |
6,887 |
Programming |
|
|
|
8 |
20,465 |
Shell Programming and Scripting |
|
|
|
9 |
7,578 |
Shell Programming and Scripting |
|
|
|
1 |
4,690 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
3,166 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,957 |
Programming |
|
|
|
6 |
4,484 |
Ubuntu |
|
|
|
1 |
2,460 |
Ubuntu |
|
|
|
1 |
18,434 |
UNIX for Advanced & Expert Users |
|
|
|
8 |
18,422 |
Shell Programming and Scripting |
|
|
|
7 |
6,383 |
Shell Programming and Scripting |
|
|
|
3 |
9,650 |
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)