9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / fdatasync.3c
blobf8402c1608ad17f061a138cc99992d4284ccceac
1 .\"
2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group.  In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document.  The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
30 .\"
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
35 .\"
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
41 .\"
42 .\"
43 .\" Copyright 1989 AT&T
44 .\" Copyright (c) 1997, The Open Group. All Rights Reserved.
45 .\" Portions Copyright (c) 2008, Sun Microsystems, Inc.  All Rights Reserved.
46 .\"
47 .TH FDATASYNC 3C "Feb 5, 2008"
48 .SH NAME
49 fdatasync \- synchronize a file's data
50 .SH SYNOPSIS
51 .LP
52 .nf
53 #include <unistd.h>
55 \fBint\fR \fBfdatasync\fR(\fBint\fR \fIfildes\fR);
56 .fi
58 .SH DESCRIPTION
59 .sp
60 .LP
61 The \fBfdatasync()\fR function forces all currently queued I/O operations
62 associated with the file indicated by file descriptor \fIfildes\fR to the
63 synchronized I/O completion state.
64 .sp
65 .LP
66 The functionality is as described for \fBfsync\fR(3C) (with the symbol
67 \fB_XOPEN_REALTIME\fR defined), with the exception that all I/O operations are
68 completed as defined for synchronised I/O data integrity completion.
69 .SH RETURN VALUES
70 .sp
71 .LP
72 If successful, the \fBfdatasync()\fR function returns \fB0\fR. Otherwise, the
73 function returns \fB\(mi1\fR and sets \fBerrno\fR to indicate the error. If the
74 \fBfdatasync()\fR function fails, outstanding I/O operations are not guaranteed
75 to have been completed.
76 .SH ERRORS
77 .sp
78 .LP
79 The  \fBfdatasync()\fR function will fail if:
80 .sp
81 .ne 2
82 .na
83 \fB\fBEBADF\fR\fR
84 .ad
85 .RS 10n
86 The \fIfildes\fR argument is not a valid file descriptor open for writing.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fBEINVAL\fR\fR
93 .ad
94 .RS 10n
95 The system does not support synchronized I/O for this file.
96 .RE
98 .sp
99 .ne 2
101 \fB\fBENOSYS\fR\fR
103 .RS 10n
104 The function \fBfdatasync()\fR is not supported by the system.
109 In the event that any of the queued I/O operations fail, \fBfdatasync()\fR
110 returns the error conditions defined for \fBread\fR(2) and \fBwrite\fR(2).
111 .SH ATTRIBUTES
114 See \fBattributes\fR(5) for descriptions of the following attributes:
119 box;
120 c | c
121 l | l .
122 ATTRIBUTE TYPE  ATTRIBUTE VALUE
124 Interface Stability     Committed
126 MT-Level        Async-Signal-Safe
128 Standard        See \fBstandards\fR(5).
131 .SH SEE ALSO
134 \fBfcntl\fR(2), \fBopen\fR(2), \fBread\fR(2), \fBwrite\fR(2), \fBfsync\fR(3C),
135 \fBaio_fsync\fR(3C), \fBfcntl.h\fR(3HEAD), \fBattributes\fR(5),
136 \fBstandards\fR(5)