forked from enlightenment/efl
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:
parent
a01af7856b
commit
3ca2a97471
|
@ -557,6 +557,7 @@ eet_flush2(Eet_File *ef)
|
||||||
|
|
||||||
/* flush all write to the file. */
|
/* flush all write to the file. */
|
||||||
fflush(ef->fp);
|
fflush(ef->fp);
|
||||||
|
fsync(fileno(ef->fp));
|
||||||
|
|
||||||
/* append signature if required */
|
/* append signature if required */
|
||||||
if (ef->key)
|
if (ef->key)
|
||||||
|
|
Loading…
Reference in New Issue