Updated: April 19, 2023 |
Synchronize file data
#include <unistd.h> int fdatasync( int filedes );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The fdatasync() function forces all queued I/O operations for the file specified by the filedes file descriptor to finish, synchronizing the file's data. The function blocks until this is finished.
This function is similar to fsync(), except that fsync() also guarantees the integrity of file information, such as access and modification times.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |