RE: Behaviour of lseek and fseek with append mode.

David Schwartz (davids@webmaster.com)
Fri, 22 Oct 1999 13:46:59 -0700


> i.e simply put it always writes to the Position pointed to by
> FILE_POINTER with
> the special property that when the file is opened initialy the
> FILE_POINTER
> gets set to the end_of_file.

That would be a disaster! Imagine two programs each trying to append log
entries to the same log file.

The whole reason that O_APPEND exists is to provide an atomic 'seek to end
and write' operation. Take that away, and there's no reason to have O_APPEND
any more.

DS

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/