aio_error

Date:

10-20-2011

NAME

aio_error - Returns error status of an asynchronous I/O operation

SYNOPSIS

#include <aio.h>

int aio_error(const aiocb_t *aiocbp);

DESCRIPTION

The aio_error function returns the error status associated with the aiocbp argument. The error status for an asynchronous I/O operation is the errno value that would be set by the corresponding read(2), write(2), fdatasync(2), or fsync(2) operation. If the operation has not yet completed, then the error status will be equal to EINPROGRESS.

RETURN VALUES

If the asynchronous I/O operation has completed successfully, then 0 shall be 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 has not yet completed, then EINPROGRESS is returned.

MESSAGES

If the following error condition occurs, the aio_error function returns -1 and sets errno to the corresponding value.

EINVAL

The aiocbp argument does not refer to an asynchronous operation whose return status has not yet been retrieved.

SEE ALSO

write(2), fdatasync(2), fsync(2)

aio_cancel(3c), aio_error(3c), aio_init(3c), aio_read(3c), aio_return(3c), aio_write(3c), lio_listio(3c)