Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Realtime Library Functionsfdatasync(3RT)


NAME

 fdatasync - synchronize a file's data

SYNOPSIS

 
cc [ flag... ] file... -lrt [ library... ]
#include <unistd.h>
int fdatasync(int fildes);

DESCRIPTION

 

The fdatasync() function forces all currently queued I/O operations associated with the file indicated by file descriptor fildes to the synchronized I/O completion state.

The functionality is as described for fsync(3C) (with the symbol _XOPEN_REALTIME defined), with the exception that all I/O operations are completed as defined for synchronised I/O data integrity completion.

RETURN VALUES

 

If successful, the fdatasync() function returns 0. Otherwise, the function returns -1 and sets errno to indicate the error. If the fdatasync() function fails, outstanding I/O operations are not guaranteed to have been completed.

ERRORS

 

The fdatasync() function will fail if:

EBADF
The fildes argument is not a valid file descriptor open for writing.
EINVAL
The system does not support synchronized I/O for this file.
ENOSYS
The function fdatasync() is not supported by the system.

In the event that any of the queued I/O operations fail, fdatasync() returns the error conditions defined for read(2) and write(2).

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelAsync-Signal-Safe

SEE ALSO

 

fcntl(2), open(2), read(2), write(2), fsync(3C), aio_fsync(3RT), attributes(5), fcntl(3HEAD)


SunOS 5.9Go To TopLast Changed 22 Jun 1998

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.