Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sync(2)

sync(8)

update(8)



FSYNC(2)                COMMAND REFERENCE                FSYNC(2)



NAME
     fsync - synchronize a file's in-core state with that on disk

SYNOPSIS
     fsync(fd)
     int fd;

DESCRIPTION
     The fsync command moves all modified data and attributes of
     fd to a permanent storage device.  This move normally
     results in all in-core modified copies of buffers for the
     associated file to be written to a disk.

     The fsync command should be used by programs which require a
     file to be in a known state, for example, in building a
     simple transaction facility.

DIAGNOSTICS
     The fsync fails if:

     [EBADF]      Argument fd is not a valid descriptor.

     [EIO]        An I/O error occurred while reading from or
                  writing to the file system.

     [EINVAL]     Argument fd refers to a socket, not to a file.

RETURN VALUE
     Upon successful completion, a value of 0 is returned;
     otherwise, a value of -1 is returned and errno is set to
     indicate the error.

CAVEATS
     The current implementation of this call is expensive for
     large files.

SEE ALSO
     sync(2), sync(8), and update(8).

















Printed 4/6/89                                                  1



%%index%%
na:264,112;
sy:376,268;
de:644,622;
di:1266,439;
rv:1705,280;
ca:1985,159;
se:2144,165;
%%index%%000000000121

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026