1FDATASYNC(3P)              POSIX Programmer's Manual             FDATASYNC(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       fdatasync - synchronize the data of a file (REALTIME)
13

SYNOPSIS

15       #include <unistd.h>
16
17       int fdatasync(int fildes);
18
19

DESCRIPTION

21       The fdatasync() function shall force all currently  queued  I/O  opera‐
22       tions  associated  with the file indicated by file descriptor fildes to
23       the synchronized I/O completion state.
24
25       The functionality shall  be  equivalent  to  fsync()  with  the  symbol
26       _POSIX_SYNCHRONIZED_IO  defined, with the exception that all I/O opera‐
27       tions shall be completed as defined for synchronized I/O data integrity
28       completion.
29

RETURN VALUE

31       If  successful, the fdatasync() function shall return the value 0; oth‐
32       erwise, the function shall return the value -1 and set errno  to  indi‐
33       cate  the  error.  If  the  fdatasync() function fails, outstanding I/O
34       operations are not guaranteed to have been completed.
35

ERRORS

37       The fdatasync() function shall fail if:
38
39       EBADF  The fildes argument is not a  valid  file  descriptor  open  for
40              writing.
41
42       EINVAL This  implementation  does not support synchronized I/O for this
43              file.
44
45
46       In the event that any of the queued I/O  operations  fail,  fdatasync()
47       shall return the error conditions defined for read() and write().
48
49       The following sections are informative.
50

EXAMPLES

52       None.
53

APPLICATION USAGE

55       None.
56

RATIONALE

58       None.
59

FUTURE DIRECTIONS

61       None.
62

SEE ALSO

64       aio_fsync(),  fcntl(), fsync(), open(), read(), write(), the Base Defi‐
65       nitions volume of IEEE Std 1003.1-2001, <unistd.h>
66
68       Portions of this text are reprinted and reproduced in  electronic  form
69       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
70       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
71       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
72       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
73       event of any discrepancy between this version and the original IEEE and
74       The Open Group Standard, the original IEEE and The Open Group  Standard
75       is  the  referee document. The original Standard can be obtained online
76       at http://www.opengroup.org/unix/online.html .
77
78
79
80IEEE/The Open Group                  2003                        FDATASYNC(3P)
Impressum