Table of Contents

NAME

SYNOPSIS

DESCRIPTION

causes the file named by or referenced by to be truncated to at most bytes in size. If the file previously was larger than this size, the extra data is lost. With the file must be open for writing.

RETURN VALUES

A value of 0 is returned if the call succeeds. If the call fails a -1 is returned, and the global variable specifies the error.

ERRORS

succeeds unless: A component of the path prefix is not a directory. A component of a pathname exceeded characters, or an entire path name exceeded characters. The named file does not exist. Search permission is denied for a component of the path prefix. The named file is not writable by the user. Too many symbolic links were encountered in translating the pathname. The named file is a directory. The named file resides on a read-only file system. The file is a pure procedure (shared text) file that is being executed. An I/O error occurred updating the inode. points outside the process’s allocated address space. succeeds unless: The is not a valid descriptor. The references a socket, not a file. The is not open for writing.

SEE ALSO

BUGS

These calls should be generalized to allow ranges of bytes in a file to be discarded.

HISTORY

The and function calls appeared in


Table of Contents