www.delorie.com/djgpp/doc/libc/libc_798.html   search  
libc.a reference

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

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 _flush_disk_cache (see section _flush_disk_cache) to try to force cached data to the disk.

Return Value

Always returns 0.

Portability

ANSI/ISO C No
POSIX No

Example

 
sync();


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004