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 Fsync causes all modified data and attributes of fd to be moved to a permanent storage device. This normally results in all in-core modified copies of buffers for the associated file to be written to a disk. Fsync 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] Fd is not a valid descriptor. [EIO] An I/O error occurred while reading from or writing to the file system. [EINVAL] 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 5/12/88 1
%%index%% na:264,112; sy:376,268; de:644,606; di:1250,421; rv:1671,280; ca:1951,159; se:2110,165; %%index%%000000000121