.\" Modified 2002-04-06 by Andries Brouwer <aeb@cwi.nl>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH TRUNCATE 2 2010-10-07 "Linux" "Linux Programmer's Manual"
+.TH TRUNCATE 2 2011-09-08 "Linux" "Linux Programmer's Manual"
.SH NAME
truncate, ftruncate \- truncate a file to a specified length
.SH SYNOPSIS
is larger than the maximum file size. (XSI)
.TP
.B EINTR
-A signal was caught during execution.
+While blocked waiting to complete,
+the call was interrupted by a signal handler; see
+.BR fcntl (2)
+and
+.BR signal (7).
.TP
.B EINVAL
The argument
.B EIO
An I/O error occurred updating the inode.
.TP
-.B EINTR
-While blocked waiting to complete,
-the call was interrupted by a signal handler; see
-.BR fcntl (2)
-and
-.BR signal (7).
-.TP
.B EISDIR
The named file is a directory.
.TP
.\" .BR ftruncate ()
.\" an additional EAGAIN error condition.
.SH NOTES
-The above description is for XSI-compliant systems.
+The details in DESCRIPTION are for XSI-compliant systems.
For non-XSI-compliant systems, the POSIX standard allows
two behaviors for
.BR ftruncate ()
to be used to extend a file beyond its current length:
a notable example on Linux is VFAT.
.\" At the very least: OSF/1, Solaris 7, and FreeBSD conform, mtk, Jan 2002
+
+The original Linux
+.BR truncate ()
+and
+.BR ftruncate ()
+system calls were not designed to handle large file offsets.
+Consequently, Linux 2.4 added
+.BR truncate64 ()
+and
+.BR ftruncate64 ()
+system calls that handle large files.
+However, these details can be ignored by applications using glibc, whose
+wrapper functions transparently employ the more recent system calls
+where they are available.
.SH BUGS
A header file bug in glibc 2.12 meant that the minimum value of
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12037