FSYNC(2)

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. Linux 0.99.11 apparently implements fsync in the kernel, but the DLL 4.4.1 libraries call sync(2) instead of the kernel function. Doubtless this will change in the near future.