lkml.org 
[lkml]   [1999]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Behaviour of lseek and fseek with append mode.
Date

> 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/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.100 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site