.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) .\" Copyright (C) 1996 Markus Kuhn. .\" .\" [This version merged from two independently written pages - aeb] .\" .\" 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. .\" .\" 1996-04-12 Andries Brouwer .\" 1996-04-13 Markus Kuhn .\" 1997-12-11 Translated by Gerardo Aburruzaga Gª .\" .TH FDATASYNC 2 "13 abril 1996" "Linux 2.0.32" "Manual del Programador de Linux" .SH NOMBRE fdatasync \- sincroniza los datos en memoria de un fichero con los de disco .SH SINOPSIS .B #include .sp .B #ifdef _POSIX_SYNCHRONIZED_IO .sp .BI "int fdatasync(int " fd ); .sp .B #endif .SH DESCRIPCIÓN .B fdatasync vuelca todos los búferes de datos de un fichero a disco (antes de que regrese la llamada al sistema). Se parece a .B fsync pero no requiere actualizar metadatos tales como la fecha/hora de acceso. Las aplicaciones que acceden a bases de datos o ficheros de registro a menudo escriben un fragmento de datos pequeño (p. ej. una línea en un fichero de registro) y luego llaman a .B fsync inmediatamente para asegurarse de que los datos escritos se guarden físicamente en el disco duro. Desafortunadamente, .B fsync siempre iniciará dos operaciones de escritura: una para los datos recién escritos y otra para actualizar la hora de modificación guardada en el nodo-í. Si esta hora de modificación no es una parte conceptual de la transacción, .B fdatasync puede emplearse para evitar operaciones innecesarias de escritura del nodo-í en disco. .SH "VALOR DEVUELTO" En caso de éxito, se devuelve cero. En caso de error, \-1, y se guarda en .I errno un valor apropiado. .SH ERRORES .TP .B EBADF .I fd no es un descriptor válido de fichero abierto para escritura. .TP .BR EROFS ", " EINVAL .I fd pertenece a un fichero especial que no admite sincronización. .TP .B EIO Ha ocurrido un error durante la sincronización. .SH FALLOS Actualmente (Linux 2.2) .B fdatasync equivale a .BR fsync . .SH "CONFORME A" POSIX1b (anteriormente, POSIX.4) .SH "VÉASE TAMBIÉN" .BR fsync (2), B.O. Gallmeister, POSIX.4, O'Reilly, pp. 220-223 y 343.