Thomas Nau <[EMAIL PROTECTED]> wrote: > > 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); > > > Thanks for clarifying! Seems I really need to check the apps with truss or > dtrace to see if they use that sequence. Allow me one more question: why > is fflush() required prior to fsync()?
You cannot simply verify this with truss unless you trace libc::fflush() too. You need to call fflush() before, in order to move the user space cache to the kernel. Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED] (uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss