use isinf(3) and isnan(3) instead of rolling our own
[unix-history] / usr / src / lib / libc / sys / sync.2
CommitLineData
931b8415
CL
1.\" Copyright (c) 1980, 1991 Regents of the University of California.
2.\" All rights reserved.
5f440b1e 3.\"
931b8415 4.\" %sccs.include.redist.man%
5f440b1e 5.\"
931b8415
CL
6.\" @(#)sync.2 6.3 (Berkeley) %G%
7.\"
8.Dd
9.Dt SYNC 2
10.Os BSD 4
11.Sh NAME
12.Nm sync
13.Nd "synchronize disk block in-core status with that on disk"
14.Sh SYNOPSIS
15.Fd #include <unistd.h>
16.Ft void
17.Fn sync void
18.Sh DESCRIPTION
19The
20.Fn sync
21function forces a write of dirty (modified) buffers
22in the block buffer cache out
23to disk. The kernel keeps this information in core to reduce
24the number of disk I/O transfers required by the system.
25As information in the cache is lost after a system crash a
26.Fn sync
27call is issued
28frequently
29by the user process
30.Xr update 8
31(about every 30 seconds).
32.Pp
33The function
34.Xr fsync 2
35may be used to synchronize individual file descriptor
36attributes.
37.Sh SEE ALSO
38.Xr fsync 2 ,
39.Xr sync 8 ,
40.Xr update 8
41.Sh BUGS
42.Fn Sync
43may return before the buffers are completely flushed.
44.Sh HISTORY
45A
46.Nm
47function call appeared in Version 6 AT&T UNIX.