HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
s
sync(2) sync(2)
NAME
sync - update disk
SYNOPSIS
#include <unistd.h>
void sync(void);
DESCRIPTION
sync() causes all information in memory that should be on disk to be written out. This includes modified
file system meta-data and delayed block I/O.
It should be used by commands and programs that examine a file system, such as fsck, df, etc. It is
mandatory before a shutdown.
The writing, although scheduled, is not necessarily complete upon return from sync.
In some HP-UX systems, sync() may be reduced to a no-op. This is permissible on a system which does
not cache buffers, or in a system that in some way ensures that the disks are always in a consistent state.
AUTHOR
sync() was developed by HP and AT&T Bell Laboratories.
SEE ALSO
sync(1M), fdatasync(2), fsync(2).
STANDARDS CONFORMANCE
sync(): SVID2, SVID3, XPG2
HP-UX Release 11i: December 2000 1 Section 2395
___
___