make sure data is on disk, don't get empty files on ext4/ext3=writeback.

Ok, raster said it would not happen but just crashed my machine and
e.cfg was lost due ext4 being in writeback by default. Accordingly to
Theodore Ts'o
(http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/) we
should fsync even on open-write-close+rename case.



SVN revision: 39536
This commit is contained in:
Gustavo Sverzut Barbieri 2009-03-17 20:49:36 +00:00
parent a01af7856b
commit 3ca2a97471
1 changed files with 1 additions and 0 deletions

View File

@ -557,6 +557,7 @@ eet_flush2(Eet_File *ef)
/* flush all write to the file. */
fflush(ef->fp);
fsync(fileno(ef->fp));
/* append signature if required */
if (ef->key)