Flushes data all the way to the disk.
Format
#include <unistd.h>
int fsync (int fd);
Argument
- fd
- A file descriptor corresponding to an open file.
Description
This function behaves much like the fflush function. The
primary difference between the two is that fsync flushes data all
the way to the disk while fflush flushes data only as far as the
underlying RMS buffers. Also, with fflush, you can flush all buffers
at once; with fsync you cannot.
Return Values
0 | Indicates successful
completion. |
-1 | Indicates
an error. |
Previous Page | Next Page | Table of Contents | Index