AIO_RETURN(2)
π
AIO_RETURN(2) β the aio_return glow-up β¨
okay bestie, so this one lives in the System Calls Manual section and honestly? it's a little icon. it's aio_return β and yes we're about to get into it π«Ά
πΈ NAME πΈ
aio_return β retrieve the return status of an asynchronous I/O operation (REALTIME)
like, it goes and picks up the final answer for you π
π LIBRARY π
Standard C Library (libc, -lc) β the classic. no cap.
β SYNOPSIS β
#include <aio.h>
ssize_t
aio_return(struct aiocb *iocb);
literally that's it. one function, one pointer, main character energy π
π¦ DESCRIPTION π¦
okay so here's the vibe: the aio_return() system call returns the final status of the asynchronous I/O request associated with the structure that iocb points to. that's the whole job. it's giving "designated driver of the async world" π
and the way that this is important β aio_return() should only be called once, to obtain the final status of an asynchronous I/O operation once it has completed. how do you know it's done? aio_error(2) returns something other than EINPROGRESS. that's your green flag, bestie π
β¨ read that again: once. not twice. not in a loop. not "just to check." once. periodt π
π₯ RETURN VALUES π₯
if the asynchronous I/O request has completed, the status is returned as described in read(2), readv(2), write(2), writev(2), or fsync(2). so like, go read those if you want the deets on what the number actually means π
otherwise, aio_return() returns -1 and sets errno to indicate the error condition. that's the "something went wrong" arc π
π ERRORS π
the aio_return() system call will fail if:
[EINVAL]β theiocbargument does not reference a completed asynchronous I/O request. (translation: you jumped the gun, bestie, it's not done yet π)[EINVAL]β the I/O operation was submitted withlio_listio(), and the value of theaio_lio_opcodeis invalid. (yeah, same error code, different crime π¨)
π 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)
the whole squad π«Ά go say hi
π STANDARDS π
the aio_return() system call is expected to conform to the IEEE Std 1003.1 (βPOSIX.1β) standard. certified, stamped, iconic π
π§ HISTORY π§
the aio_return() system call first appeared in FreeBSD 3.0. a legend since day one β
π AUTHORS π
this manual page was written by Wes Peters <wes@softweyr.com>. shoutout to Wes, we love a credited icon πΈ
and that's the page!! this dump came to you courtesy of Debian, dated January 11, 2021 β mwah, hope this helped, go get that final status bestie ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1999 Softweyr LLC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms