Mail Archives: cygwin-developers/1998/02/19/02:03:57
Ian Lance Taylor wrote:
> > I'm not sure. When O_APPEND is set, we have to seek to end of file
on
> > fdopen() call. When __SAPP is set, _every_ write call seeks to eof
before
> > write! Is it a correct behavior for O_APPEND? BTW, where fdflags
variable
> > is defined?
>
> That is correct for O_APPEND: every write should go to the end of the
> file, wherever the end of the file happens to be at that time. For
> example, on Unix this can be used for writing log files from several
> processes; provided each write is done in a single call, if you use
> O_APPEND then you know that none of the writes will clobber another.
>
> The patch looks OK to me.
This behavior doesn't works with gnu CSSC. The code makes fdopen(fd,
O_APPEND), writes some lines to the end of file, seeks to the beginning of
file and writes new file header. With this patch new file header will be
written to the end of file!
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.
- Raw text -