Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

RedHat 5.2

(Apollo)

fsync(2)


FSYNC

FSYNC

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO

NAME

fsync − synchronize a file’s complete in-core state with that on disk

SYNOPSIS

#include <unistd.h>

int fsync(int fd);

DESCRIPTION

fsync copies all in-core parts of a file to disk.

In some applications, fdatasync is a more efficient alternative to fsync.

RETURN VALUE

On success, zero is returned. On error, −1 is returned, and errno is set appropriately.

ERRORS

EBADF

fd is not a valid file descriptor open for writing.

EROFS, EINVAL

fd is bound to a special file which does not support synchronization.

EIO

An error occurred during synchronization.

CONFORMING TO

POSIX.1b (formerly POSIX.4)

SEE ALSO

bdflush(2), fdatasync(2), sync(2), update(8), sync(8)



fsync(2)