AIO_ERROR(3P)
π AIO_ERROR(3P) β POSIX Programmer's Manual π
okay bestie, welcome to aio_error from the POSIX Programmer's Manual, no cap π«Ά
β¨ PROLOG β¨
so like, heads up first: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β so if you're on Linux, go consult the corresponding Linux manual page for the deets on how Linux actually behaves β or honestly, the interface may not even be implemented on Linux at all. vibe check passed? good, let's go π
πΈ NAME πΈ
aio_error β retrieve errors status for an asynchronous I/O operation
π¦ SYNOPSIS π¦
#include <aio.h>
int aio_error(const struct aiocb *aiocbp);
π DESCRIPTION π
okay so the aio_error() function shall return the error status associated with the aiocb structure referenced by the aiocbp argument. that's the whole main character move. β¨
and like, what even is that error status? it's the errno value that would be set by the corresponding read(), write(), fdatasync(), or fsync() operation. yes bestie, it's literally borrowing errno's whole thing.
if the operation has not yet completed, then the error status shall be equal to [EINPROGRESS]. she's still cooking π₯
π¨ okay important one: if theaiocbstructure pointed to byaiocbpis not associated with an operation that has been scheduled, the results are undefined. that's not a cute mysterious vibe, that's undefined behaviour, periodt. don't do it.
π RETURN VALUE π
- if the asynchronous I/O operation has completed successfully β
0shall be returned β¨ - if the asynchronous operation has completed unsuccessfully β the error status, as described for
read(),write(),fdatasync(), andfsync(), shall be returned π - if the asynchronous I/O operation has not yet completed β
[EINPROGRESS]shall be returned π
and if the aio_error() function itself fails? it shall return -1 and set errno to indicate the error. yeah, she can fail too, she's not immune π
π ERRORS π
the aio_error() function may fail if:
EINVALβ theaiocbpargument does not refer to an asynchronous operation whose return status has not yet been retrieved.
π‘ the following sections are informative. (translation: they're the bonus content, not the rules π)
π EXAMPLES π
None.
π§ APPLICATION USAGE π§
None.
β RATIONALE β
None.
π FUTURE DIRECTIONS π
None.
π SEE ALSO π
aio_cancel(), aio_fsync(), aio_read(), aio_return(), aio_write(), close(), exec, exit(), fork(), lio_listio(), lseek(), read()
the Base Definitions volume of POSIX.1β2017, <aio.h> π
π COPYRIGHT π
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. (she said what she said β the original is the final boss π)
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 .
that's the whole page bestie, every last bit of it π this one's brought to you by IEEE/The Open Group, 2017 β yeah, 2017, she's vintage and she's still iconic πβ¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms