int fsync(fd)
int fd;
fsync() moves all modified data and attributes of fd to a permanent storage device: all in-core modified copies of buffers for the associated file have been written to a disk when the call returns. Note: this is different than sync.2 which schedules disk I/O for all files (as though an fsync() had been done on all files) but returns before the I/O completes.
fsync() should be used by programs which require a file to be in a known state; for example, a program which contains a simple transaction facility might use it to ensure that all modifications to a file or files caused by a transaction were recorded on disk.
fsync() returns:
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97