summaryrefslogtreecommitdiffstats
path: root/upstream/opensuse-tumbleweed/man2/truncate.2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:52:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 10:52:33 +0000
commit2c3307fb903f427be3d021c5780b75cac9af2ce8 (patch)
tree65cf431f40b7481d81ae2dfce9576342686448f7 /upstream/opensuse-tumbleweed/man2/truncate.2
parentReleasing progress-linux version 4.22.0-1~progress7.99u1. (diff)
downloadmanpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.tar.xz
manpages-l10n-2c3307fb903f427be3d021c5780b75cac9af2ce8.zip
Merging upstream version 4.23.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/truncate.2')
-rw-r--r--upstream/opensuse-tumbleweed/man2/truncate.226
1 files changed, 13 insertions, 13 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/truncate.2 b/upstream/opensuse-tumbleweed/man2/truncate.2
index 02a12e51..2b62140d 100644
--- a/upstream/opensuse-tumbleweed/man2/truncate.2
+++ b/upstream/opensuse-tumbleweed/man2/truncate.2
@@ -12,7 +12,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 2023-03-30 "Linux man-pages 6.05.01"
+.TH truncate 2 2024-05-02 "Linux man-pages (unreleased)"
.SH NAME
truncate, ftruncate \- truncate a file to a specified length
.SH LIBRARY
@@ -21,16 +21,16 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <unistd.h>
-.PP
+.P
.BI "int truncate(const char *" path ", off_t " length );
.BI "int ftruncate(int " fd ", off_t " length );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR truncate ():
.nf
_XOPEN_SOURCE >= 500
@@ -38,7 +38,7 @@ Feature Test Macro Requirements for glibc (see
|| /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
|| /* glibc <= 2.19: */ _BSD_SOURCE
.fi
-.PP
+.P
.BR ftruncate ():
.nf
_XOPEN_SOURCE >= 500
@@ -58,20 +58,20 @@ or referenced by
to be truncated to a size of precisely
.I length
bytes.
-.PP
+.P
If the file previously was larger than this size, the extra data is lost.
If the file previously was shorter, it is extended, and
the extended part reads as null bytes (\[aq]\e0\[aq]).
-.PP
+.P
The file offset is not changed.
-.PP
+.P
If the size changed, then the st_ctime and st_mtime fields
(respectively, time of last status change and
time of last modification; see
.BR inode (7))
for the file are updated,
and the set-user-ID and set-group-ID mode bits may be cleared.
-.PP
+.P
With
.BR ftruncate (),
the file must be open for writing; with
@@ -148,7 +148,7 @@ The named file resides on a read-only filesystem.
.TP
.B ETXTBSY
The file is an executable file that is being executed.
-.PP
+.P
For
.BR ftruncate ()
the same errors apply, but instead of things that can be wrong with
@@ -197,7 +197,7 @@ 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
-.PP
+.P
On some 32-bit architectures,
the calling signature for these system calls differ,
for the reasons described in
@@ -212,13 +212,13 @@ POSIX.1-2001,
.\" POSIX.1-2001 also has
.\" .BR truncate (),
.\" as an XSI extension.
-.\" .LP
+.\" .P
.\" SVr4 documents additional
.\" .BR truncate ()
.\" error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
.\" .BR ftruncate ()
.\" an additional EAGAIN error condition.
-.PP
+.P
The original Linux
.BR truncate ()
and