]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
fea681da MK |
2 | .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) |
3 | .\" | |
e4a74ca8 | 4 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da | 5 | .\" |
4c1c5274 | 6 | .TH aio_error 3 (date) "Linux man-pages (unreleased)" |
fea681da MK |
7 | .SH NAME |
8 | aio_error \- get error status of asynchronous I/O operation | |
a42212d0 AC |
9 | .SH LIBRARY |
10 | Real-time library | |
8fc3b2cf | 11 | .RI ( librt ", " \-lrt ) |
fea681da | 12 | .SH SYNOPSIS |
c7db92b9 | 13 | .nf |
fea681da | 14 | .B "#include <aio.h>" |
c6d039a3 | 15 | .P |
fea681da | 16 | .BI "int aio_error(const struct aiocb *" aiocbp ); |
c7db92b9 | 17 | .fi |
fea681da MK |
18 | .SH DESCRIPTION |
19 | The | |
e511ffb6 | 20 | .BR aio_error () |
fea681da MK |
21 | function returns the error status for the asynchronous I/O request |
22 | with control block pointed to by | |
23 | .IR aiocbp . | |
2b014d76 MK |
24 | (See |
25 | .BR aio (7) | |
26 | for a description of the | |
27 | .I aiocb | |
28 | structure.) | |
47297adb | 29 | .SH RETURN VALUE |
ba9e24aa | 30 | This function returns one of the following: |
4279e42d AC |
31 | .TP |
32 | .B EINPROGRESS | |
1274071a | 33 | if the request has not been |
c13182ef | 34 | completed yet. |
4279e42d AC |
35 | .TP |
36 | .B ECANCELED | |
1274071a | 37 | if the request was canceled. |
4279e42d AC |
38 | .TP |
39 | .B 0 | |
40 | if the request completed successfully. | |
41 | .TP | |
42 | .RB "> " 0 | |
e19783f5 | 43 | A positive error number, if the asynchronous I/O operation failed. |
ba9e24aa | 44 | This is the same value that would have been stored in the |
fea681da | 45 | .I errno |
ba9e24aa MK |
46 | variable in the case of a synchronous |
47 | .BR read (2), | |
48 | .BR write (2), | |
49 | .BR fsync (2), | |
fea681da | 50 | or |
ba9e24aa MK |
51 | .BR fdatasync (2) |
52 | call. | |
fea681da MK |
53 | .SH ERRORS |
54 | .TP | |
55 | .B EINVAL | |
56 | .I aiocbp | |
57 | does not point at a control block for an asynchronous I/O request | |
58 | of which the return status (see | |
59 | .BR aio_return (3)) | |
60 | has not been retrieved yet. | |
aea038d6 MK |
61 | .TP |
62 | .B ENOSYS | |
63 | .BR aio_error () | |
64 | is not implemented. | |
34a8bc85 | 65 | .SH ATTRIBUTES |
37e166e8 MK |
66 | For an explanation of the terms used in this section, see |
67 | .BR attributes (7). | |
68 | .TS | |
69 | allbox; | |
c466875e | 70 | lbx lb lb |
37e166e8 MK |
71 | l l l. |
72 | Interface Attribute Value | |
73 | T{ | |
9e54434e BR |
74 | .na |
75 | .nh | |
34a8bc85 | 76 | .BR aio_error () |
37e166e8 MK |
77 | T} Thread safety MT-Safe |
78 | .TE | |
3113c7f3 | 79 | .SH STANDARDS |
4131356c AC |
80 | POSIX.1-2008. |
81 | .SH HISTORY | |
82 | glibc 2.1. | |
83 | POSIX.1-2001. | |
a14af333 | 84 | .SH EXAMPLES |
b44bee16 MK |
85 | See |
86 | .BR aio (7). | |
47297adb | 87 | .SH SEE ALSO |
fea681da MK |
88 | .BR aio_cancel (3), |
89 | .BR aio_fsync (3), | |
90 | .BR aio_read (3), | |
91 | .BR aio_return (3), | |
92 | .BR aio_suspend (3), | |
25fa6c3d | 93 | .BR aio_write (3), |
cd587df6 | 94 | .BR lio_listio (3), |
25fa6c3d | 95 | .BR aio (7) |