Go to the first, previous, next, last section, table of contents.


sync

Syntax

#include <unistd.h>

int sync(void);

Description

Intended to assist porting Unix programs. Under Unix, sync flushes all caches of previously written data. In this implementation, sync calls fsync on every open file. See section fsync It also calls See section _flush_disk_cache to try to force cached data to the disk.

Return Value

Always returns 0.

Portability

not ANSI, not POSIX

Example

sync();


Go to the first, previous, next, last section, table of contents.