mirror of https://github.com/mkerrisk/man-pages
pread.2: BUGS: Note O_APPEND + pwrite() does the wrong thing
See https://bugzilla.kernel.org/show_bug.cgi?id=43178 Reported-by: Kasper Dupont <kasperd@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
927ad1fb59
commit
c3ee1c5d6a
14
man2/pread.2
14
man2/pread.2
|
@ -20,7 +20,7 @@
|
|||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||
.\" the source, must acknowledge the copyright and authors of this work.
|
||||
.\"
|
||||
.TH PREAD 2 2010-11-21 "Linux" "Linux Programmer's Manual"
|
||||
.TH PREAD 2 2012-04-30 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
pread, pwrite \- read from or write to a file descriptor at a given offset
|
||||
.SH SYNOPSIS
|
||||
|
@ -128,6 +128,18 @@ The glibc
|
|||
and
|
||||
.BR pwrite ()
|
||||
wrapper functions transparently deal with the change.
|
||||
.SH BUGS
|
||||
POSIX requires that opening a file with the
|
||||
.BR O_APPEND
|
||||
flag should have no affect on the location at which
|
||||
.BR pwrite ()
|
||||
writes data.
|
||||
However, on Linux, if a file is opened with
|
||||
.\" FIXME https://bugzilla.kernel.org/show_bug.cgi?id=43178
|
||||
.BR O_APPEND ,
|
||||
.BR pwrite ()
|
||||
appends data to the end of the file, regardless of the value of
|
||||
.IR offset .
|
||||
.SH "SEE ALSO"
|
||||
.BR lseek (2),
|
||||
.BR read (2),
|
||||
|
|
Loading…
Reference in New Issue