*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> fdatasync (2)              



NAME    [Toc]    [Back]

     fdatasync - synchronize the data of a file

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     fdatasync(int fd);

DESCRIPTION    [Toc]    [Back]

     The fdatasync() function forces all modified data associated with the
     file descriptor fd to be flushed to stable storage.

     The functionality is as described for fsync(2), with the exception that
     file status information need not be synchronized, which may result in a
     performance gain, compared to fsync(2).  This behaviour is commonly known
     as synchronized I/O data integrity completion.

RETURN VALUES    [Toc]    [Back]

     A value of 0 is returned on success.  Otherwise, a value -1 is returned
     and errno is set to indicate the error.

ERRORS    [Toc]    [Back]

     The fdatasync() function will fail if:

     [EBADF]            The fd argument is not a valid file descriptor.

     [EINVAL]           This implementation does not support syncronized I/O
                        for this file.

     [ENOSYS]           The fdatasync() function is not supported by this

     In the event that any of the I/O operations to be performed fail,
     fdatasync() returns the eror conditions defined for read(2) and write(2),
     and outstanding I/O operations are not guaranteed to have been completed.

SEE ALSO    [Toc]    [Back]

     fsync(2), open(2), read(2), write(2)

STANDARDS    [Toc]    [Back]

     The fdatasync() function conforms to IEEE Std 1003.1b-1993 (``POSIX.1'').

BSD                              May 30, 1998                              BSD
[ Back ]
 Similar pages
Name OS Title
fdatasync Linux synchronize a file's in-core data with that on disk
msync Tru64 Synchronize a mapped file
msync Linux synchronize a file with a memory map
sync HP-UX synchronize file systems
msync HP-UX synchronize the memory of a mapped file with physical storage
t_sync Tru64 Synchronize transport library
msync NetBSD synchronize a mapped region
t_sync IRIX synchronize transport library
t_sync HP-UX synchronize transport library
msync FreeBSD synchronize a mapped region
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service