fdatasync(3R) manual page
Table of Contents
fdatasync - synchronize a file’s data
cc [ flag ... ] file ... -lposix4
[ library ... ]
#include <unistd.h>
int fdatasync(int fildes);
Async-Signal-Safe
fdatasync() forces all currently queued I/O operations associated
with the file descriptor fildes to synchronized I/O data integrity completion.
See fcntl(5)
definition of O_DSYNC.
fdatasync() returns 0
upon success; otherwise, it returns -1 and sets errno to indicate the error
condition.
- EBADF
- fildes is not a valid file descriptor.
- EINVAL
- This
implementation does not support synchronized I/O for this file.
- ENOSYS
- fdatasync()
is not supported by this implementation.
In the event that any of the queued
I/O operations fail, fdatasync() returns the error conditions defined for
read(2)
and write(2)
.
fcntl(2)
, open(2)
, read(2)
, write(2)
, fsync(3C)
,
aio_fsync(3R)
, fcntl(5)
If fdatasync() fails, outstanding I/O operations
are not guaranteed to have been completed.
Table of Contents