svn commit: r358186 - head/lib/libc/sys
Eric van Gyzen
vangyzen at FreeBSD.org
Thu Feb 20 23:47:10 UTC 2020
Author: vangyzen
Date: Thu Feb 20 23:47:09 2020
New Revision: 358186
URL: https://svnweb.freebsd.org/changeset/base/358186
Log:
truncate(2): extending the file is required by POSIX 2008
Update the man page to mention that extending a file with truncate(2)
is required by POSIX as of 2008.
Reviewed by: bcr
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D23354
Modified:
head/lib/libc/sys/truncate.2
Modified: head/lib/libc/sys/truncate.2
==============================================================================
--- head/lib/libc/sys/truncate.2 Thu Feb 20 21:52:36 2020 (r358185)
+++ head/lib/libc/sys/truncate.2 Thu Feb 20 23:47:09 2020 (r358186)
@@ -28,7 +28,7 @@
.\" @(#)truncate.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd May 4, 2015
+.Dd January 24, 2020
.Dt TRUNCATE 2
.Os
.Sh NAME
@@ -160,6 +160,9 @@ system calls appeared in
These calls should be generalized to allow ranges
of bytes in a file to be discarded.
.Pp
-Use of
+Historically, the use of
.Fn truncate
-to extend a file is not portable.
+or
+.Fn ftruncate
+to extend a file was not portable, but this behavior became required in
+.St -p1003.1-2008 .
More information about the svn-src-all
mailing list