[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

fsync

Syntax

 
#include <unistd.h>

int fsync(int file);

Description

Forces all information about the file with the given descriptor to be synchronized with the disk image. Works by calling DOS function 0x68. Warning: External disk caches are not flushed by this function.

fsync does not support directories.

Return Value

Zero on success, nonzero on failure.

Portability

ANSI/ISO C No
POSIX No

Example

 
fsync(fileno(stdout));