]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) |
2 | .\" | |
1dd72f9c | 3 | .\" %%%LICENSE_START(GPLv2+_DOC_FULL) |
fea681da MK |
4 | .\" This is free documentation; you can redistribute it and/or |
5 | .\" modify it under the terms of the GNU General Public License as | |
6 | .\" published by the Free Software Foundation; either version 2 of | |
7 | .\" the License, or (at your option) any later version. | |
8 | .\" | |
9 | .\" The GNU General Public License's references to "object code" | |
10 | .\" and "executables" are to be interpreted as the output of any | |
11 | .\" document formatting or typesetting system, including | |
12 | .\" intermediate and printed output. | |
13 | .\" | |
14 | .\" This manual is distributed in the hope that it will be useful, | |
15 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | .\" GNU General Public License for more details. | |
18 | .\" | |
19 | .\" You should have received a copy of the GNU General Public | |
c715f741 MK |
20 | .\" License along with this manual; if not, see |
21 | .\" <http://www.gnu.org/licenses/>. | |
6a8d8745 | 22 | .\" %%%LICENSE_END |
fea681da | 23 | .\" |
fe0fefbf | 24 | .TH AIO_ERROR 3 2015-03-02 "" "Linux Programmer's Manual" |
fea681da MK |
25 | .SH NAME |
26 | aio_error \- get error status of asynchronous I/O operation | |
27 | .SH SYNOPSIS | |
fea681da | 28 | .B "#include <aio.h>" |
68e4db0a | 29 | .PP |
fea681da | 30 | .BI "int aio_error(const struct aiocb *" aiocbp ); |
68e4db0a | 31 | .PP |
0ad25472 | 32 | Link with \fI\-lrt\fP. |
fea681da MK |
33 | .SH DESCRIPTION |
34 | The | |
e511ffb6 | 35 | .BR aio_error () |
fea681da MK |
36 | function returns the error status for the asynchronous I/O request |
37 | with control block pointed to by | |
38 | .IR aiocbp . | |
2b014d76 MK |
39 | (See |
40 | .BR aio (7) | |
41 | for a description of the | |
42 | .I aiocb | |
43 | structure.) | |
47297adb | 44 | .SH RETURN VALUE |
ba9e24aa MK |
45 | This function returns one of the following: |
46 | .IP * 3 | |
47 | .BR EINPROGRESS , | |
1274071a | 48 | if the request has not been |
c13182ef | 49 | completed yet. |
ba9e24aa MK |
50 | .IP * |
51 | .BR ECANCELED , | |
1274071a | 52 | if the request was canceled. |
ba9e24aa MK |
53 | .IP * |
54 | 0, if the request completed successfully. | |
55 | .IP * | |
e19783f5 | 56 | A positive error number, if the asynchronous I/O operation failed. |
ba9e24aa | 57 | This is the same value that would have been stored in the |
fea681da | 58 | .I errno |
ba9e24aa MK |
59 | variable in the case of a synchronous |
60 | .BR read (2), | |
61 | .BR write (2), | |
62 | .BR fsync (2), | |
fea681da | 63 | or |
ba9e24aa MK |
64 | .BR fdatasync (2) |
65 | call. | |
fea681da MK |
66 | .SH ERRORS |
67 | .TP | |
68 | .B EINVAL | |
69 | .I aiocbp | |
70 | does not point at a control block for an asynchronous I/O request | |
71 | of which the return status (see | |
72 | .BR aio_return (3)) | |
73 | has not been retrieved yet. | |
aea038d6 MK |
74 | .TP |
75 | .B ENOSYS | |
76 | .BR aio_error () | |
77 | is not implemented. | |
793514ae MK |
78 | .SH VERSIONS |
79 | The | |
80 | .BR aio_error () | |
81 | function is available since glibc 2.1. | |
34a8bc85 | 82 | .SH ATTRIBUTES |
37e166e8 MK |
83 | For an explanation of the terms used in this section, see |
84 | .BR attributes (7). | |
85 | .TS | |
86 | allbox; | |
87 | lb lb lb | |
88 | l l l. | |
89 | Interface Attribute Value | |
90 | T{ | |
34a8bc85 | 91 | .BR aio_error () |
37e166e8 MK |
92 | T} Thread safety MT-Safe |
93 | .TE | |
47297adb | 94 | .SH CONFORMING TO |
793514ae | 95 | POSIX.1-2001, POSIX.1-2008. |
b44bee16 MK |
96 | .SH EXAMPLE |
97 | See | |
98 | .BR aio (7). | |
47297adb | 99 | .SH SEE ALSO |
fea681da MK |
100 | .BR aio_cancel (3), |
101 | .BR aio_fsync (3), | |
102 | .BR aio_read (3), | |
103 | .BR aio_return (3), | |
104 | .BR aio_suspend (3), | |
25fa6c3d | 105 | .BR aio_write (3), |
cd587df6 | 106 | .BR lio_listio (3), |
25fa6c3d | 107 | .BR aio (7) |