logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

fdatasync.3p (3048B)


  1. '\" et
  2. .TH FDATASYNC "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. fdatasync
  12. \(em synchronize the data of a file
  13. (\fBREALTIME\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <unistd.h>
  18. .P
  19. int fdatasync(int \fIfildes\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIfdatasync\fR()
  24. function shall force all currently queued I/O operations associated
  25. with the file indicated by file descriptor
  26. .IR fildes
  27. to the synchronized I/O completion state.
  28. .P
  29. The functionality shall be equivalent to
  30. \fIfsync\fR()
  31. with the symbol _POSIX_SYNCHRONIZED_IO defined,
  32. with the exception that all I/O operations shall be completed as
  33. defined for synchronized I/O data integrity completion.
  34. .SH "RETURN VALUE"
  35. If successful, the
  36. \fIfdatasync\fR()
  37. function shall return the value 0; otherwise, the function shall return
  38. the value \-1 and set
  39. .IR errno
  40. to indicate the error. If the
  41. \fIfdatasync\fR()
  42. function fails, outstanding I/O operations are not guaranteed to have
  43. been completed.
  44. .SH ERRORS
  45. The
  46. \fIfdatasync\fR()
  47. function shall fail if:
  48. .TP
  49. .BR EBADF
  50. The
  51. .IR fildes
  52. argument is not a valid file descriptor.
  53. .TP
  54. .BR EINVAL
  55. This implementation does not support synchronized I/O for this file.
  56. .P
  57. In the event that any of the queued I/O operations fail,
  58. \fIfdatasync\fR()
  59. shall return the error conditions defined for
  60. \fIread\fR()
  61. and
  62. \fIwrite\fR().
  63. .LP
  64. .IR "The following sections are informative."
  65. .SH EXAMPLES
  66. None.
  67. .SH "APPLICATION USAGE"
  68. Note that even if the file descriptor is not open for writing,
  69. if there are any pending write requests on the underlying file,
  70. then that I/O will be completed prior to the return of
  71. \fIfdatasync\fR().
  72. .SH RATIONALE
  73. None.
  74. .SH "FUTURE DIRECTIONS"
  75. None.
  76. .SH "SEE ALSO"
  77. .IR "\fIaio_fsync\fR\^(\|)",
  78. .IR "\fIfcntl\fR\^(\|)",
  79. .IR "\fIfsync\fR\^(\|)",
  80. .IR "\fIopen\fR\^(\|)",
  81. .IR "\fIread\fR\^(\|)",
  82. .IR "\fIwrite\fR\^(\|)"
  83. .P
  84. The Base Definitions volume of POSIX.1\(hy2017,
  85. .IR "\fB<unistd.h>\fP"
  86. .\"
  87. .SH COPYRIGHT
  88. Portions of this text are reprinted and reproduced in electronic form
  89. from IEEE Std 1003.1-2017, Standard for Information Technology
  90. -- Portable Operating System Interface (POSIX), The Open Group Base
  91. Specifications Issue 7, 2018 Edition,
  92. Copyright (C) 2018 by the Institute of
  93. Electrical and Electronics Engineers, Inc and The Open Group.
  94. In the event of any discrepancy between this version and the original IEEE and
  95. The Open Group Standard, the original IEEE and The Open Group Standard
  96. is the referee document. The original Standard can be obtained online at
  97. http://www.opengroup.org/unix/online.html .
  98. .PP
  99. Any typographical or formatting errors that appear
  100. in this page are most likely
  101. to have been introduced during the conversion of the source files to
  102. man page format. To report such errors, see
  103. https://www.kernel.org/doc/man-pages/reporting_bugs.html .