>I'd tend to disagree with that.  POSIX/SUS does not guarantee data makes
>it to disk until you do an fsync() (or open the file with the right flags,
>or other techniques).  If an application REQUIRES that data get to disk,
>it really MUST DTRT.

Indeed; want your data safe?  Use:

        fflush(fp);
        fsync(fileno(fp));
        fclose(fp);

and check errors.


(It's remarkable how often people get the above sequence wrong and only
do something like fsync(fileno(fp)); fclose(fp);


Casper
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to