If you used fsync it should write to permanent storage immediately, and it's no longer the OS' problem. If it's not flushing immediately, maybe the mystery is at the filesystem level or even hardware, both of which you didn't provide. When you say 'users' are they looking at the file via NFS or HTTP? if the latter they could be seeing a cached copy (proxy, browser, etc.).
On Fri, Jul 22, 2011 at 2:44 AM, Unga <unga...@yahoo.com> wrote: > Hi all > > How to sync a file on FreeBSD (esp. on 8.1) to disk? > > I used fsync(2), but does not immediately flush to disk. > > I want my writing to a file (a log file) immediately available to other users > to read. > > Best regards > Unga > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" > _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"