]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/aio_error.3
aio_cancel.3, aio_error.3, aio_fsync.3, aio_read.3, aio_return.3, aio_suspend.3,...
[thirdparty/man-pages.git] / man3 / aio_error.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
12 .\"
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
17 .\"
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
21 .\" USA.
22 .\"
23 .TH AIO_ERROR 3 2010-10-02 "" "Linux Programmer's Manual"
24 .SH NAME
25 aio_error \- get error status of asynchronous I/O operation
26 .SH SYNOPSIS
27 .B "#include <aio.h>"
28 .sp
29 .BI "int aio_error(const struct aiocb *" aiocbp );
30 .sp
31 Link with \fI\-lrt\fP.
32 .SH DESCRIPTION
33 The
34 .BR aio_error ()
35 function returns the error status for the asynchronous I/O request
36 with control block pointed to by
37 .IR aiocbp .
38 .SH "RETURN VALUE"
39 This function returns
40 .B EINPROGRESS
41 if the request has not been
42 completed yet.
43 It returns
44 .B ECANCELED
45 if the request was canceled.
46 It returns 0 if the request completed successfully.
47 Otherwise an error value is returned, the same value that would have
48 been stored in the
49 .I errno
50 variable in case of a synchronous
51 .IR read ,
52 .IR write ,
53 .IR fsync ,
54 or
55 .I fdatasync
56 request.
57 On error, the error value is returned.
58 .SH ERRORS
59 .TP
60 .B EINVAL
61 .I aiocbp
62 does not point at a control block for an asynchronous I/O request
63 of which the return status (see
64 .BR aio_return (3))
65 has not been retrieved yet.
66 .SH VERSIONS
67 The
68 .BR aio_error ()
69 function is available since glibc 2.1.
70 .SH "CONFORMING TO"
71 POSIX.1-2001, POSIX.1-2008.
72 .SH "SEE ALSO"
73 .BR aio_cancel (3),
74 .BR aio_fsync (3),
75 .BR aio_read (3),
76 .BR aio_return (3),
77 .BR aio_suspend (3),
78 .BR aio_write (3),
79 .BR aio (7)