aio_error(3)
β¨ aio_error(3) β¨
okay bestie, so this one's from the Library Functions Manual, and it's literally the vibe check for your async I/O π¦
π NAME π
aio_error β get error status of asynchronous I/O operation
πΈ LIBRARY πΈ
Real-time library (librt, -lrt)
π SYNOPSIS π
#include <aio.h>
int aio_error(const struct aiocb *aiocbp);
π DESCRIPTION π
So basically, aio_error() returns the error status for the asynchronous I/O request whose control block is pointed to by aiocbp. That's it, that's the whole job. She's simple, she's iconic, she serves π
(if you're like "bestie what even IS an aiocb struct" β go read aio(7), it's all laid out there, no cap)
π RETURN VALUE π
This function hands you back one of these, and every single one matters:
EINPROGRESSβ the request has not been completed yet. it's still cooking πECANCELEDβ the request was canceled. rip πͺ¦0β the request completed successfully. slay!! β¨> 0β a positive error number if the asynchronous I/O operation failed. and this is the exact same value that would have been stored in theerrnovariable in the case of a synchronousread(2),write(2),fsync(2), orfdatasync(2)call. same number, different door πͺ
β ERRORS β
EINVALβaiocbpdoes not point at a control block for an asynchronous I/O request of which the return status (seeaio_return(3)) has not been retrieved yet. like, that's not the girl you're looking for πENOSYSβaio_error()is not implemented. she's not even here, she never showed up π
π ATTRIBUTES π
For an explanation of the terms used in this section, see attributes(7).
- Interface:
aio_error() - Attribute: Thread safety
- Value:
MT-Safe
(MT-Safe means you can call her from multiple threads and she will NOT start drama π«Ά)
π§ STANDARDS π§
POSIX.1-2008.
π HISTORY π
- glibc
2.1. POSIX.1-2001.
she's been around. a legend. a veteran. respect her π
πΈ EXAMPLES πΈ
See aio(7).
π¦ SEE ALSO π¦
aio_cancel(3), aio_fsync(3), aio_read(3), aio_return(3), aio_suspend(3), aio_write(3), lio_listio(3), aio(7)
and that's the whole page, bestie!! this one shipped in Linux man-pages 6.20, dated 2026-02-08 β so go forth, check your async errors, and stay iconic πβ¨π
π¦ where this page comes from
- 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 6.20
- π the page's license: GPL-2.0-or-later
- Copyright 2003, Andries E. Brouwer <aeb@cwi.nl>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms