[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    fdatasync(3R) manual page Table of Contents

Name

fdatasync - synchronize a file’s data

Synopsis

cc [ flag ... ] file ... -lposix4 [ library ... ]

#include <unistd.h>

int fdatasync(int fildes);

MT-Level

Async-Signal-Safe

Description

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.

Return Values

fdatasync() returns 0 upon success; otherwise, it returns -1 and sets errno to indicate the error condition.

Errors

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) .

See Also

fcntl(2) , open(2) , read(2) , write(2) , fsync(3C) , aio_fsync(3R) , fcntl(5)

Notes

If fdatasync() fails, outstanding I/O operations are not guaranteed to have been completed.


Table of Contents