1AIO_ERROR(P)               POSIX Programmer's Manual              AIO_ERROR(P)
2
3
4

NAME

6       aio_error  -  retrieve  errors status for an asynchronous I/O operation
7       (REALTIME)
8

SYNOPSIS

10       #include <aio.h>
11
12       int aio_error(const struct aiocb *aiocbp);
13
14

DESCRIPTION

16       The aio_error() function shall return the error status associated  with
17       the aiocb structure referenced by the aiocbp argument. The error status
18       for an asynchronous I/O operation is the errno value that would be  set
19       by the corresponding read(), write(),   fdatasync(),  or fsync() opera‐
20       tion. If the operation has not yet completed,  then  the  error  status
21       shall be equal to [EINPROGRESS].
22

RETURN VALUE

24       If  the  asynchronous  I/O operation has completed successfully, then 0
25       shall be returned. If the asynchronous operation has  completed  unsuc‐
26       cessfully,  then  the  error  status, as described for read(), write(),
27       fdatasync(),  and fsync(), shall be returned.  If the asynchronous  I/O
28       operation has not yet completed, then [EINPROGRESS] shall be returned.
29

ERRORS

31       The aio_error() function may fail if:
32
33       EINVAL The  aiocbp argument does not refer to an asynchronous operation
34              whose return status has not yet been retrieved.
35
36
37       The following sections are informative.
38

EXAMPLES

40       None.
41

APPLICATION USAGE

43       The aio_error() function is part of the Asynchronous Input  and  Output
44       option and need not be available on all implementations.
45

RATIONALE

47       None.
48

FUTURE DIRECTIONS

50       None.
51

SEE ALSO

53       aio_cancel()  , aio_fsync() , aio_read() , aio_return() , aio_write() ,
54       close() , exec() , exit() , fork() , lio_listio() , lseek() , read()  ,
55       the Base Definitions volume of IEEE Std 1003.1-2001, <aio.h>
56
58       Portions  of  this text are reprinted and reproduced in electronic form
59       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
60       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
61       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
62       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
63       event of any discrepancy between this version and the original IEEE and
64       The  Open Group Standard, the original IEEE and The Open Group Standard
65       is the referee document. The original Standard can be  obtained  online
66       at http://www.opengroup.org/unix/online.html .
67
68
69
70IEEE/The Open Group                  2003                         AIO_ERROR(P)
Impressum