Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The function repositions the offset of the file descriptor to the argument according to the directive The argument must be an open file descriptor. repositions the file pointer as follows: If is the offset is set to bytes. If is the offset is set to its current location plus bytes. If is the offset is set to the size of the file plus bytes. The function allows the file offset to be set beyond the end of the existing end-of-file of the file. If data is later written at this point, subsequent reads of the data in the gap return bytes of zeros (until data is actually written into the gap). Some devices are incapable of seeking. The value of the pointer associated with such a device is undefined.

RETURN VALUES

Upon successful completion, returns the resulting offset location as measured in bytes from the beginning of the file. Otherwise, a value of -1 is returned and is set to indicate the error.

ERRORS

will fail and the file pointer will remain unchanged if: is not an open file descriptor. is associated with a pipe, socket, or FIFO. is not a proper value.

SEE ALSO

BUGS

This document’s use of is incorrect English, but is maintained for historical reasons.

STANDARDS

The function conforms to


Table of Contents