tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fopen(.., "a") + fseek



On Thu, Nov 06, 2008 at 10:54:07AM -0500, Martin S. Weber wrote:
> On Thu, Nov 06, 2008 at 04:43:52PM +0100, Joerg Sonnenberger wrote:
> > SUSv3 on fopen(3):
> >     Opening a file with append mode (a as the first character
> >     in the mode argument) shall cause all subsequent writes
> >     to the file to be forced to the then current end-of-file,
> >     regardless of intervening calls to fseek().
> 
> okay, now I see it in the manpage, too (was blind obviously)
>      Opening a file with append mode causes all subsequent writes
>      to it to be forced to the then current end of file, regardless
>      of intervening repositioning of the stream.
> 
> The question remains whether fseek shouldn't return an error on
> a stream opened with append mode?

Have you tried *reading* after fseek?

Joerg


Home | Main Index | Thread Index | Old Index