aio_error(3)

NAME
aio_error - Getting the Status of AIO Operations

SYNOPSYS
#include <errno.h>

#include <aio.h>

int aio_error (const struct aiocb *aiocbp)

DESCRIPTION
The function aio_error determines the error state of the request described by the struct aiocb variable pointed to by aiocbp When the operation is performed truly asynchronously (as with aio_read and aio_write and with lio_listio when the mode is LIO_NOWAIT ), one sometimes needs to know whether a specific request already terminated and if so, what the result was. When the sources are compiled with _FILE_OFFSET_BITS == 64 this function is in fact aio_error64 since the LFS interface transparently replaces the normal implementation.

RETURN VALUES
If the request has not yet terminated the value returned is always EINPROGRESS aio_error returns is either 0 if the request completed successfully or it returns the value which would be stored in the errno variable if the request would have been done using read , write , or fsync

ERRORS

ENOSYS
    if it is not implemented. It could also return

EINVAL
    if the aiocbp parameter does not refer to an asynchronous operation whose return status is not yet known.

SEE ALSO
aio(3), aio_cancel(3), aio_cancel64(3), aio_error64(3), aio_fsync(3), aio_fsync64(3), aio_init(3), aio_read(3), aio_read64(3), aio_return(3), aio_return64(3), aio_suspend(3), aio_suspend64(3), aio_write(3), aio_write64(3), errno(3),