aio_error - retrieve errors status for an asynchronous I/O operation (REALTIME)
#include <aio.h> int aio_error(const struct aiocb *aiocbp);
The aio_error() function returns the error status associated with the aiocb structure referenced by the aiocbp argument. The error status for an asynchronous I/O operation is the errno value that would be set by the corresponding read(), write(), or fsync() operation. If the operation has not yet completed, then the error status will be equal to EINPROGRESS.
If the asynchronous I/O operation has completed successfully, then 0 is returned. If the asynchronous operation has completed unsuccessfully, then the error status, as described for read(), write(), and fsync(), is returned. If the asynchronous I/O operation has not yet completed, then EINPROGRESS is returned.
The aio_error() function will fail if:
- The aio_error() function is not supported by this implementation.
The aio_error() function may fail if:
- The aiocbp argument does not refer to an asynchronous operation whose return status has not yet been retrieved.
aio_read(), aio_write(), aio_fsync(), lio_listio(), aio_return(), aio_cancel(), read(), lseek(), close(), _exit(), exec, fork().
Derived from the POSIX Realtime Extension (1003.1b-1993/1003.1i-1995)