Merge commit 'b31320a79e2054c6739b5229259dbf98f3afc547' into merges
[unleashed.git] / share / man / man2 / sync.2
blob89e86a3b5131d9f105e664709dd1d801fd20c25f
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SYNC 2 "Jul 5, 1990"
7 .SH NAME
8 sync \- update super block
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <unistd.h>
14 \fBvoid\fR \fBsync\fR(\fBvoid\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBsync()\fR function writes all information in memory that should be on
21 disk, including modified super blocks, modified inodes, and delayed block I/O.
22 .sp
23 .LP
24 Unlike \fBfsync\fR(3C), which completes the writing before it returns,
25 \fBsync()\fR schedules but does not necessarily complete the writing before
26 returning.
27 .SH USAGE
28 .sp
29 .LP
30 The \fBsync()\fR function should be used by applications that examine a file
31 system, such as \fBfsck\fR(8), and \fBdf\fR(8), and is mandatory before
32 rebooting.
33 .SH ATTRIBUTES
34 .sp
35 .LP
36 See \fBattributes\fR(5) for descriptions of the following attributes:
37 .sp
39 .sp
40 .TS
41 box;
42 c | c
43 l | l .
44 ATTRIBUTE TYPE  ATTRIBUTE VALUE
46 Interface Stability     Standard
47 .TE
49 .SH SEE ALSO
50 .sp
51 .LP
52 \fBdf\fR(8), \fBfsck\fR(8), \fBfsync\fR(3C), \fBattributes\fR(5),
53 \fBstandards\fR(5)