DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

aio_error(S)


aio_error -- retrieve error status of asynchronous I/O operation

Syntax

cc . . . -lsuds
#include <aio.h>

int aio_error(const struct aiocb *aiocbp);

Description

The aio_error(S) 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 set by the corresponding read(S) or write(S) or fsync(S) operation. If the operation has not yet completed, then the error status is equal to EINPROGRESS.

Return values

If the asynchronous I/O operation completes successfully, then 0 is returned. If the asynchronous operation completes 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.

Diagnostics

For the following condition, 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

aio(FP), aio_read(S), aio_return(S), aio_write(S), close(S), _exit(S), exec(S), fork(S), lio_listio(S), lseek(S), read(S)

Standards conformance

Text reprinted and/or adapted from IEEE Std 1003.1b-1993, IEEE Standard for Information Technology, POSIX Part 1: System Application Program Interface (API) Amendment 1: Realtime Extensions [C Language], copyright © 1993 by the Institute of Electrical and Electronics Engineers, Inc. The IEEE takes no responsibility for and will assume no liability for damages resulting from the reader's misinterpretation of said information resulting from the placement and context in this publication. Information is reproduced with the permission of the IEEE.
© 2003 System Services (S)
SCO OpenServer Release 5.0.7 -- 11 February 2003