Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2020 23:47:10 +0000 (UTC)
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r358186 - head/lib/libc/sys
Message-ID:  <202002202347.01KNlALn093572@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 .



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002202347.01KNlALn093572>