1fdatasync(3C)            Standard C Library Functions            fdatasync(3C)
2
3
4

NAME

6       fdatasync - synchronize a file's data
7

SYNOPSIS

9       #include <unistd.h>
10
11       int fdatasync(int fildes);
12
13

DESCRIPTION

15       The  fdatasync()  function  forces  all currently queued I/O operations
16       associated with the file indicated by file  descriptor  fildes  to  the
17       synchronized I/O completion state.
18
19
20       The  functionality  is  as  described  for  fsync(3C)  (with the symbol
21       _XOPEN_REALTIME defined), with the exception that  all  I/O  operations
22       are  completed  as  defined for synchronised I/O data integrity comple‐
23       tion.
24

RETURN VALUES

26       If successful, the fdatasync() function returns 0. Otherwise, the func‐
27       tion  returns  −1  and  sets errno to indicate the error. If the fdata‐
28       sync() function fails, outstanding I/O operations are not guaranteed to
29       have been completed.
30

ERRORS

32       The  fdatasync() function will fail if:
33
34       EBADF     The  fildes  argument is not a valid file descriptor open for
35                 writing.
36
37
38       EINVAL    The system does not support synchronized I/O for this file.
39
40
41       ENOSYS    The function fdatasync() is not supported by the system.
42
43
44
45       In the event that any of the queued I/O  operations  fail,  fdatasync()
46       returns the error conditions defined for read(2) and write(2).
47

ATTRIBUTES

49       See attributes(5) for descriptions of the following attributes:
50
51
52
53
54       ┌─────────────────────────────┬─────────────────────────────┐
55       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
56       ├─────────────────────────────┼─────────────────────────────┤
57       │Interface Stability          │Committed                    │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │MT-Level                     │Async-Signal-Safe            │
60       ├─────────────────────────────┼─────────────────────────────┤
61       │Standard                     │See standards(5).            │
62       └─────────────────────────────┴─────────────────────────────┘
63

SEE ALSO

65       fcntl(2),   open(2),   read(2),   write(2),  fsync(3C),  aio_fsync(3C),
66       fcntl.h(3HEAD), attributes(5), standards(5)
67
68
69
70SunOS 5.11                        5 Feb 2008                     fdatasync(3C)
Impressum