On Wed, Jan 20, 2021 at 04:26:08PM +0000, Al Viro wrote: > [1] yes, it is possible to have O_APPEND opened pipes - open a FIFO with > O_APPEND and you've got it. We are not quite consistent in handling > those - sendfile() to such is rejected, splice() is not.
BTW, according to manpages of splice(2) and sendfile(2), we have EINVAL [snip] target file is opened in append mode [snip] and EINVAL out_fd has the O_APPEND flag set. This is not currently supported by sendfile(). However, splice(2) to FIFO opened with O_APPEND works just fine. So it doesn't match the manpage either. Why do we care about O_APPEND on anything without FMODE_PWRITE (including pipes), anyway? All writes there ignore position, after all...