lseek.2: O_APPEND overrides the effect of lseek() when doing file writes

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-02-20 22:33:49 +01:00
parent 4296478383
commit 6b74f6c767
1 changed files with 9 additions and 0 deletions

View File

@ -237,6 +237,15 @@ See
for a discussion of the relationship between file descriptors,
open file descriptions, and files.
If the
.B O_APPEND
file status flag is set on the open file description,
then a
.BR write (2)
.I always
moves the file offset to the end of the file, regardless of the use of
.BR lseek ().
The
.I off_t
data type is a signed integer data type specified by POSIX.1.