AIO_ERROR(3)               POSIX Programmer's Manual              AIO_ERROR(3)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       aio_error -- retrieve errors status for an asynchronous I/O operation

SSYYNNOOPPSSIISS
       #include <aio.h>

       int aio_error(const struct aiocb *_a_i_o_c_b_p);

DDEESSCCRRIIPPTTIIOONN
       The _a_i_o___e_r_r_o_r() function shall return the error status associated with
       the aaiiooccbb structure referenced by the _a_i_o_c_b_p argument. The error status
       for an asynchronous I/O operation is the _e_r_r_n_o value that would be set
       by the corresponding _r_e_a_d(), _w_r_i_t_e(), _f_d_a_t_a_s_y_n_c(), or _f_s_y_n_c()
       operation. If the operation has not yet completed, then the error
       status shall be equal to [[EEIINNPPRROOGGRREESSSS]].

       If the aaiiooccbb structure pointed to by _a_i_o_c_b_p is not associated with an
       operation that has been scheduled, the results are undefined.

RREETTUURRNN VVAALLUUEE
       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 _r_e_a_d(),
       _w_r_i_t_e(), _f_d_a_t_a_s_y_n_c(), and _f_s_y_n_c(), shall be returned. If the
       asynchronous I/O operation has not yet completed, then [[EEIINNPPRROOGGRREESSSS]]
       shall be returned.

       If the _a_i_o___e_r_r_o_r() function fails, it shall return -1 and set _e_r_r_n_o to
       indicate the error.

EERRRROORRSS
       The _a_i_o___e_r_r_o_r() function may fail if:

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

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

RRAATTIIOONNAALLEE
       None.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _a_i_o___c_a_n_c_e_l(), _a_i_o___f_s_y_n_c(), _a_i_o___r_e_a_d(), _a_i_o___r_e_t_u_r_n(), _a_i_o___w_r_i_t_e(),
       _c_l_o_s_e(), _e_x_e_c, _e_x_i_t(), _f_o_r_k(), _l_i_o___l_i_s_t_i_o(), _l_s_e_e_k(), _r_e_a_d()

       The Base Definitions volume of POSIX.1-2017, <<aaiioo..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                         AIO_ERROR(3)
