Go to the previous, next section.

fsync

SYNOPSIS

int fsync(int fd);

DESCRIPTION

Synchronizes the state of the file on disk with the state of the file in core. (For one thing, it flushes the file buffers.)

PARAMETERS

fd: [in] the file to sync.

RETURN VALUE

On success zero is returned. On error, -1 is returned and errno is set to one of: EINVAL, EBADF or EIO.

Go to the previous, next section.