1sync(2) System Calls sync(2)
2
3
4
6 sync - update super block
7
9 #include <unistd.h>
10
11 void sync(void);
12
13
15 The sync() function writes all information in memory that should be on
16 disk, including modified super blocks, modified inodes, and delayed
17 block I/O.
18
19
20 Unlike fsync(3C), which completes the writing before it returns, sync()
21 schedules but does not necessarily complete the writing before return‐
22 ing.
23
25 The sync() function should be used by applications that examine a file
26 system, such as fsck(1M), and df(1M), and is mandatory before reboot‐
27 ing.
28
30 See attributes(5) for descriptions of the following attributes:
31
32
33
34
35 ┌─────────────────────────────┬─────────────────────────────┐
36 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
37 ├─────────────────────────────┼─────────────────────────────┤
38 │Interface Stability │Standard │
39 └─────────────────────────────┴─────────────────────────────┘
40
42 df(1M), fsck(1M), fsync(3C), attributes(5), standards(5)
43
44
45
46SunOS 5.11 5 Jul 1990 sync(2)