Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > S

sync(2)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

sync, lsync — update disk

SYNOPSIS

#include <unistd.h>

void sync(void);

void lsync(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, and so on. 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.

lsync() is a deprecated system call that is currently functionally identical to sync(). HP-UX kernel support for it remains only to aid compatibility with very old HP-UX binaries.

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

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.