Debian Codegraph @

upstream/debian-trixie/man3/aio_error.3

raw
1 '\" t
2 .\" Copyright (c) 2003 Andries Brouwer ([email protected])
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .TH aio_error 3 2024-05-02 "Linux man-pages 6.9.1"
7 .SH NAME
8 aio_error \- get error status of asynchronous I/O operation
9 .SH LIBRARY
10 Real-time library
11 .RI ( librt ", " \-lrt )
12 .SH SYNOPSIS
13 .nf
14 .B "#include <aio.h>"
15 .P
16 .BI "int aio_error(const struct aiocb *" aiocbp );
17 .fi
18 .SH DESCRIPTION
19 The
20 .BR aio_error ()
21 function returns the error status for the asynchronous I/O request
22 with control block pointed to by
23 .IR aiocbp .
24 (See
25 .BR aio (7)
26 for a description of the
27 .I aiocb
28 structure.)
29 .SH RETURN VALUE
30 This function returns one of the following:
31 .TP
32 .B EINPROGRESS
33 if the request has not been
34 completed yet.
35 .TP
36 .B ECANCELED
37 if the request was canceled.
38 .TP
39 .B 0
40 if the request completed successfully.
41 .TP
42 .RB "> " 0
43 A positive error number, if the asynchronous I/O operation failed.
44 This is the same value that would have been stored in the
45 .I errno
46 variable in the case of a synchronous
47 .BR read (2),
48 .BR write (2),
49 .BR fsync (2),
50 or
51 .BR fdatasync (2)
52 call.
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.
61 .TP
62 .B ENOSYS
63 .BR aio_error ()
64 is not implemented.
65 .SH ATTRIBUTES
66 For an explanation of the terms used in this section, see
67 .BR attributes (7).
68 .TS
69 allbox;
70 lbx lb lb
71 l l l.
72 Interface Attribute Value
73 T{
74 .na
75 .nh
76 .BR aio_error ()
77 T} Thread safety MT-Safe
78 .TE
79 .SH STANDARDS
80 POSIX.1-2008.
81 .SH HISTORY
82 glibc 2.1.
83 POSIX.1-2001.
84 .SH EXAMPLES
85 See
86 .BR aio (7).
87 .SH SEE ALSO
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),
93 .BR aio_write (3),
94 .BR lio_listio (3),
95 .BR aio (7)