On 21/03/17 20:48, Marco van de Voort wrote:
He closes the file. That should sync.
Not necessarily. On Unix there is also a difference between closing a file and calling fsync() on it. And even then there are sometimes additional things you may have to do to survive sudden power loss, such as first using fcntl(fd,F_FULLFSYNC) on OS X in case you want to OS to also instruct the disk controller to flush its internal caches (if supported by the disk).
Jonas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal