MAN sezione 2 - Torna all'indice
MAN PAGE: FSYNC(2)Contents
fsync - synchronize a file's complete in-core state with
that on disk
#include <unistd.h>
int fsync(int fd);
fsync copies all in-core parts of a file to disk.
In some applications, fdatasync is a more efficient alter
native to fsync.
On success, zero is returned. On error, -1 is returned,
and errno is set appropriately.
EBADF fd is not a valid file descriptor open for writing.
EROFS, EINVAL
fd is bound to a special file which does not sup
port synchronization.
EIO An error occurred during synchronization.
POSIX.1b (formerly POSIX.4)
bdflush(2), fdatasync(2), sync(2), update(8), sync(8)
Linux 1.3.85 1994-04-13 1 |