This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] Move offset to end of file when fdopen is in "a" mode (#16532)


On Tue, Feb 11, 2014 at 11:22:31AM +0100, OndÅej BÃlka wrote:
> > It shouldn't make a difference.  The only reason to seek to the end is
> > to record the offset of the file end into the FILE object.  If an
> > lseek moves it elsewhere, we don't care.  Data will be appended to the
> > end of the file in any case since we add an O_APPEND to the fd.
> >
> How does that handle a+ mode? A offset should be at start but you need
> to write at end.

See Patch 2/2.  That's where a+ is fixed.

Siddhesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]