OSDN Git Service

(split) LDP: Update original to v3.37.
[linuxjm/LDP_man-pages.git] / original / man2 / truncate.2
index 3e237ce..276731f 100644 (file)
@@ -38,7 +38,7 @@
 .\" 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
@@ -130,7 +130,11 @@ The argument
 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
@@ -140,13 +144,6 @@ is negative or larger than the maximum file size.
 .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
@@ -207,7 +204,7 @@ does not reference a regular file.
 .\" .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 ()
@@ -227,6 +224,20 @@ and
 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