Synchronizes the changes to a file.
#include <unistd.h> int fsync ( int fildes);
(IN) Specifies a file descriptor.
If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:
The fsync function forces all data associated with the specified file to be transferred to the storage device associated with the specified file. The function does not return until the system has completed that action or until an error is detected. If an error is detected, there is no guarantee that all I/O operations completed.