GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
io_pipe(3) FreeBSD Library Functions Manual io_pipe(3)

io_pipe - create a Unix pipe

#include <libowfat/io.h>

int io_pipe(int64 pfd[2]);

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.

io_readfile(3), io_createfile(3), io_socketpair(3)

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.