FSYNC

Section: Linux Programmer's Manual (2)
Updated: 15 April 1994
Index Return to Main Contents
 

NAME

fsync - synchronize a file's 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.  

RETURN VALUE

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

ERRORS

EBADF
fd is not a valid open file descriptor.
EROFS
EINVAL fd is bound to a special file which doesn't support synchronization.
EIO
An error occurred during synchronization.
 

SEE ALSO

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


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:24:32 GMT, March 22, 2025