AIO_RETURN(2)

πŸ’– AIO_RETURN(2) πŸ’– β€” the System Calls Manual one, bestie

okay so welcome to the manual page for aio_return, and yes it lives in section 2 of the System Calls Manual which is giving very "the grown-ups' section" energy and honestly? deserved. πŸŽ€


✨ NAME ✨

aio_return β€” retrieve return status of asynchronous I/O operation (REALTIME)

πŸ“š LIBRARY πŸ“š

Standard C Library (libc, -lc)

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <aio.h>

ssize_t
aio_return(struct aiocb *iocb);

🌸 DESCRIPTION 🌸

so the aio_return() system call hands you back the final status of the asynchronous I/O request that's tied to the structure that iocb points at. that's it. that's the whole vibe. πŸ’…

IMPORTANT: you call aio_return() only once, bestie. one time. to grab the final status of an async I/O operation after it's already done β€” and by "done" we mean aio_error(2) is returning something that is not EINPROGRESS. if you're still seeing EINPROGRESS, the operation is lowkey still cooking and you do NOT have permission to collect. ⏳

🫢 RETURN VALUES 🫢

if the asynchronous I/O request has completed, the status comes back exactly as described in read(2), write(2), or fsync(2). ✨

otherwise, aio_return() returns -1 and sets errno to point at whatever the error condition is. sad girl hours. 😭

πŸ’€ ERRORS πŸ’€

the aio_return() system call will fail if:

  • [EINVAL] β€” the iocb argument does not reference a completed asynchronous I/O request. like. it's not done. stop asking. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

aio_cancel(2), aio_error(2), aio_suspend(2), aio_waitcomplete(2), aio_write(2), fsync(2), read(2), write(2), aio(4)

🌈 STANDARDS 🌈

the aio_return() system call is expected to conform to the IEEE Std 1003.1 (β€œPOSIX.1”) standard. iconic behavior, no notes. ⭐

🧚 HISTORY 🧚

the aio_return() system call first appeared in FreeBSD 3.0. vintage. a classic. πŸ’œ

πŸ“ AUTHORS πŸ“

this manual page was written by Wes Peters <wes@softweyr.com>. king behavior, we love a credited author. πŸ‘‘


and that's the whole page bestie, mwah πŸ’‹ β€” brought to you by Debian, March 21, 2016, aka the footer that gets the last word. periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from