Date: Thu, 25 Feb 2021 06:57:55 GMT From: Guangyuan Yang <ygy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 12c27808888b - stable/13 - pwrite(2): add a BUGS section Message-ID: <202102250657.11P6vtIj069282@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by ygy (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=12c27808888b05db09b58af735fbc342080bdb37 commit 12c27808888b05db09b58af735fbc342080bdb37 Author: Guangyuan Yang <ygy@FreeBSD.org> AuthorDate: 2021-02-20 08:03:15 +0000 Commit: Guangyuan Yang <ygy@FreeBSD.org> CommitDate: 2021-02-25 06:57:35 +0000 pwrite(2): add a BUGS section Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd. Submitted by: Ka Ho Ng <khng300@gmail.com> Reviewed by: gbe, yuripv Differential Revision: https://reviews.freebsd.org/D28372 (cherry picked from commit 504e64af32ba6c62fdcc894a3b1da76061c64796) --- lib/libc/sys/write.2 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102250657.11P6vtIj069282>