.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified by Michael Haardt .\" Modified Sat Jul 24 12:02:47 1993 by Rik Faith .\" Modified 15 Apr 1995 by Michael Chastain : .\" Added reference to `bdflush(2)'. .\" Modified 960414 by Andries Brouwer : .\" Added the fact that since 1.3.20 sync actually waits. .\" Modified Tue Oct 22 22:27:07 1996 by Eric S. Raymond .\" Modified 2001-10-10 by aeb, following Michael Kerrisk. .\" .\" Tradotto da Goffredo Baroncelli kreijack@usa.net .\" Aggiornamento a man-pages-2.11 di Giulio Daprelà .\" novembre 2005 .\" Aggiornamento a man-pages-2.38 di Giulio Daprelà - agosto 2006 .\" Aggiornamento a man-pages-2.64 di Elisabetta Galli - agosto 2007 .\" .TH SYNC 2 "26 luglio 2007" "Linux" "Linux Programmer's Manual" .SH NOME sync \- svuota i buffer della cache del disco .SH SINTASSI .B #include .sp .B void sync(void); .sp .in -4n Test delle funzioni e requisiti delle macro per glibc (vedere .BR feature_test_macros (7)): .in .sp .BR sync (): _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 .SH DESCRIZIONE .BR sync () prima riversa gli inode nei buffer, poi i buffer sul disco. .SH ERRORI Questa funzione termina sempre con successo. .SH "CONFORME A" SVr4, 4.3BSD, POSIX.1-2001. .SH NOTE A partire da glibc 2.2.2 il prototipo Linux è come elencato sopra, seguendo i vari standard. In libc4, libc5, e glibc fino a 2.2.1 era "int sync(void)", e .BR sync () restituiva sempre 0. .SH BACHI Secondo le specifiche degli standard (per esempio, POSIX.1-2001), .BR sync () programma le scritture, ma potrebbe tornare prima che la scrittura sia eseguita. Tuttavia, a partire dalla versione 1.3.20 di Linux, essa aspetta. (Questo ancora non garantisce l'integrità dei dati: i dischi moderni hanno grandi cache). .SH "VEDERE ANCHE" .BR bdflush (2), .BR fdatasync (2), .BR fsync (2), .BR sync (8), .BR update (8)