On a complying implementation there is no way to use pwrite
to make it work with O_APPEND
. On linux pwrite
ignores the offset for O_APPEND
:
BUGS
POSIX requires that opening a file with the O_APPEND flag should have no affect on the location at which pwrite() writes data. However, on Linux, if a file is opened with O_APPEND, pwrite() appends data to the end of the file, regardless of the value of offset.