RE: [AD] OSX Notes, Take 34

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Could this be a problem with flushing when closing the file ?
> Alternatively, I used to have problems with such things when
> using the pthreads version of Allegro - some syscalls (read/write)
> would get interrupted (errno EINTR), so maybe some calls need
> protecting against that too. Just a guess.

I forgot to say: the allegro packfile routines call their own
flush_buffer() function as a part of pack_fclose(), as well.  However,
I don't see a call to fflush() anywhere inside that function -- it
seems to me the routine simply forces writes and then checks that the
file length is correct?  Am I reading this wrong?  I don't know how
write() and open() differ from fwrite() and fopen() -- do they not
require a fflush() call for flushing file buffers?  Out of curiosity's
sake, I hope someone can explain this to me, because this code looks
like black magic. ^_^;;

(The line and file the function is defined on is src/file.c, line 2471,
in version 1.47CVS of file.c.)

- Charles




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/