fopen + mmap

Jakub Jelinek jakub@redhat.com
Sat Jan 19 06:16:00 GMT 2002


On Sat, Jan 19, 2002 at 11:25:07AM +0100, Andreas Jaeger wrote:
> Ulrich Drepper <drepper@redhat.com> writes:
> 
> > Before anybody gets more excited about this, I have modifications
> > which don't require setting the file position to the end.  The reason
> > I can live with this is that some more functions get simplified.  I
> > didn't do it initially this way since the extra code isn't justified
> > by the little bit of speed gain.
> 
> Fine.
> 
> > In general, it is not acceptable that positive development is hindered
> > by broken code.  There never ever was any document saying that the
> > file position is such and such after fopen.  People relying on it are
> > simply wrong.  And even though this code might now survive sometime
> > longer it does not mean it should not be fixed.
> 
> How should the broken code get fixed?  Can you just describe it
> priefly - and I'll try to fix at least ld...

fflush will move the kernel file position to the current read position.

	Jakub



More information about the Libc-hacker mailing list