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
11

NAME

13       fdatasync — synchronize the data of a file (REALTIME)
14

SYNOPSIS

16       #include <unistd.h>
17
18       int fdatasync(int fildes);
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       In the event that any of the queued I/O  operations  fail,  fdatasync()
46       shall return the error conditions defined for read() and write().
47
48       The following sections are informative.
49

EXAMPLES

51       None.
52

APPLICATION USAGE

54       None.
55

RATIONALE

57       None.
58

FUTURE DIRECTIONS

60       None.
61

SEE ALSO

63       aio_fsync(), fcntl(), fsync(), open(), read(), write()
64
65       The Base Definitions volume of POSIX.1‐2008, <unistd.h>
66
68       Portions  of  this text are reprinted and reproduced in electronic form
69       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
70       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
71       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
72       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
73       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
74       event of any discrepancy between this version and the original IEEE and
75       The Open Group Standard, the original IEEE and The Open Group  Standard
76       is  the  referee document. The original Standard can be obtained online
77       at http://www.unix.org/online.html .
78
79       Any typographical or formatting errors that appear  in  this  page  are
80       most likely to have been introduced during the conversion of the source
81       files to man page format. To report such errors,  see  https://www.ker
82       nel.org/doc/man-pages/reporting_bugs.html .
83
84
85
86IEEE/The Open Group                  2013                        FDATASYNC(3P)
Impressum