aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangyuan Yang <ygy@FreeBSD.org>2021-02-20 08:03:15 +0000
committerGuangyuan Yang <ygy@FreeBSD.org>2021-02-20 08:05:43 +0000
commit504e64af32ba6c62fdcc894a3b1da76061c64796 (patch)
treeef63040b247c4987d0971ce043a6e306c98e61db
parent150fc89a12a7e41b8e7f5777d2ed762f7e40ea92 (diff)
downloadsrc-504e64af32ba6c62fdcc894a3b1da76061c64796.tar.gz
src-504e64af32ba6c62fdcc894a3b1da76061c64796.zip
pwrite(2): add a BUGS section
Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd. MFC after: 3 days Submitted by: Ka Ho Ng <khng300@gmail.com> Reviewed by: gbe, yuripv Differential Revision: https://reviews.freebsd.org/D28372
-rw-r--r--lib/libc/sys/write.216
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2
index f05db0de81c4..937e95b53a14 100644
--- a/lib/libc/sys/write.2
+++ b/lib/libc/sys/write.2
@@ -28,7 +28,7 @@
.\" @(#)write.2 8.5 (Berkeley) 4/2/94
.\" $FreeBSD$
.\"
-.Dd October 25, 2020
+.Dd February 11, 2021
.Dt WRITE 2
.Os
.Sh NAME
@@ -298,3 +298,17 @@ The
.Fn write
function appeared in
.At v1 .
+.Sh BUGS
+The
+.Fn pwrite
+system call appends the file without changing the file offset if
+.Dv O_APPEND
+is set, contrary to
+.St -p1003.1-2008
+where
+.Fn pwrite
+writes into
+.Fa offset
+regardless of whether
+.Dv O_APPEND
+is set.