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

  man pages->Tru64 Unix man pages -> fsync (2)              
Title
Content
Arch
Section
 

fsync(2)

Contents


NAME    [Toc]    [Back]

       fsync - Write changes in a file to permanent storage

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int fsync(
               int fildes );

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       fsync(): XSH4.0, XSH4.2, XSH5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies a valid open file descriptor.

DESCRIPTION    [Toc]    [Back]

       The  fsync()  function  causes system buffers containing a
       file's modified data and attributes to be written to  permanent
  storage.   The  fsync()  function  does not return
       until the operation has been completed. The fsync()  function
  provides file integrity, ensuring that data and file
       attribute information in permanent storage is identical to
       data and file attribute information in the buffer.

NOTES    [Toc]    [Back]

       The  file  identified by the fildes parameter must be open
       for writing when the fsync() function  is  issued  or  the
       call will fail.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the fsync() function returns a
       value of 0 (zero). If the fsync() function fails, a  value
       of  -1 is returned and errno is set to indicate the error.
       If fsync() fails, outstanding I/O operations are not guaranteed
 to have been completed.

ERRORS    [Toc]    [Back]

       If  the fsync() function fails, errno may be set to one of
       the following values: The fildes parameter is not a  valid
       file descriptor.  The fildes parameter does not refer to a
       file on which this operation is possible.

       If any queued I/O operations fail,  the  fsync()  function
       returns  error  conditions  defined  for  the  read()  and
       write() functions.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: aio_fsync(2), fdatasync(2), fcntl(2),  open(2),
       read(2), sync(2), write(2)

       Standards: standards(5)



                                                         fsync(2)
[ Back ]
 Similar pages
Name OS Title
aio_fsync Tru64 Asynchronously writes changes in a file to permanent storage
fdatasync Tru64 Writes data changes in a file to permanent storage
AFreadmisc IRIX read from / write to / move logical read/write pointer for data in a miscellaneous chunk in an audio file
ncplogout FreeBSD schedule permanent connection to close
ncplogin FreeBSD create permanent connection to a NetWare server
AFclosefile IRIX close an audio file, update file header if file was opened for write access.
sat_write_filehdr IRIX write audit file header, write close time to audit file header
AFsyncfile IRIX write out a consistent snapshot of an audio file without actually closing the file
efi_fsinit HP-UX write an EFI file system header on a device file
bptojdb Tru64 Converts bootptab entries into permanent, static IP entries for JOIN databases.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service