[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

sync Subroutine

Purpose

Updates all file systems.

Library

Standard C Library (libc.a)

Syntax

#include <unistd.h>
 
void sync ( )

Description

The sync subroutine causes all information in memory that should be on disk to be written out. The writing, although scheduled, is not necessarily complete upon return from this subroutine. Types of information to be written include modified superblocks, i-nodes, data blocks, and indirect blocks.

The sync subroutine should be used by programs that examine a file system, such as the df and fsck commands.

If Network File System (NFS) is installed on your system, information in memory that relates to remote files is scheduled to be sent to the remote node.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The fsync subroutine.

The df command, sync command.

Files, Directories, and File Systems for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]