int fdatasync(int fildes);
The fdatasync() function shall force all currently queued I/O opera-
tions associated with the file indicated by file descriptor fildes to
the synchronized I/O completion state.
The functionality shall be equivalent to fsync() with the symbol
_POSIX_SYNCHRONIZED_IO defined, with the exception that all I/O opera-
tions shall be completed as defined for synchronized I/O data integrity
If successful, the fdatasync() function shall return the value 0; oth-
erwise, the function shall return the value -1 and set errno to indi-
cate the error. If the fdatasync() function fails, outstanding I/O
operations are not guaranteed to have been completed.
The fdatasync() function shall fail if:
EBADF The fildes argument is not a valid file descriptor open for
EINVAL This implementation does not support synchronized I/O for this
In the event that any of the queued I/O operations fail, fdatasync()
shall return the error conditions defined for read() and write().
The following sections are informative.
aio_fsync() , fcntl() , fsync() , open() , read() , write() , the Base
Definitions volume of IEEE Std 1003.1-2001, <unistd.h>
IEEE/The Open Group 2003 FDATASYNC(P)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2013
All Rights Reserved.