The GNU C Library - Low-Level I/O

Node: Low-Level I/O Next: File System Interface Prev: I/O on Streams Up: Top

Low-Level Input/Output

This chapter describes functions for performing low-level input/output operations on file descriptors. These functions include the primitives for the higher-level I/O functions described in I/O on Streams, as well as functions for performing low-level control operations for which there are no equivalents on streams.

Stream-level I/O is more flexible and usually more convenient; therefore, programmers generally use the descriptor-level functions only when necessary. These are some of the usual reasons:

Opening and Closing Files How to open and close file
descriptors.
I/O Primitives Reading and writing data.
File Position Primitive Setting a descriptor's file
position.
Descriptors and Streams Converting descriptor to stream
or vice-versa.
Stream/Descriptor Precautions Precautions needed if you use both
descriptors and streams.
Waiting for I/O How to check for input or output
on multiple file descriptors.
Control Operations Various other operations on file
descriptors.
Duplicating Descriptors Fcntl commands for duplicating
file descriptors.
Descriptor Flags Fcntl commands for manipulating
flags associated with file
descriptors.
File Status Flags Fcntl commands for manipulating
flags associated with open files.
File Locks Fcntl commands for implementing
file locking.
Interrupt Input Getting an asynchronous signal when
input arrives.


Next: File System Interface Up: Top