AIO_ERROR(2)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

✨ AIO_ERROR(2) ✨

okay so bestie, welcome to the AIO_ERROR(2) page πŸ’… this one lives in the System Calls Manual and it's about checking up on your async I/O like the nosy best friend you are 🫢


🌸 NAME 🌸

aio_error β€” retrieve error status of asynchronous I/O operation (REALTIME) ⏰✨

πŸŽ€ LIBRARY πŸŽ€

Standard C Library (libc, -lc) πŸ“šπŸ’–

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <aio.h>

int
aio_error(const struct aiocb *iocb);

πŸ’œ DESCRIPTION πŸ’œ

So here's the vibe: the aio_error() system call returns the error status of the asynchronous I/O request that's attached to the structure pointed to by iocb πŸ”βœ¨ like it literally just peeks at your request and tells you what's up with it. main character energy honestly πŸ‘‘

πŸ”₯ RETURN VALUES πŸ”₯

Okay so the tea β˜•:

  • If the asynchronous I/O request has completed successfully, aio_error() returns 0 β€” slay, no notes πŸ’…
  • If the request has not yet completed, EINPROGRESS is returned β€” it's giving "girl, be patient" ⏳😭
  • If the request has completed unsuccessfully, the error status is returned as described in read(2), readv(2), write(2), writev(2), or fsync(2) πŸ’€ (iykyk)
  • On failure, aio_error() returns -1 and sets errno to indicate the error condition πŸ™ˆ

🌈 ERRORS 🌈

The aio_error() system call will fail if:

  • [EINVAL] β€” The iocb argument does not reference an outstanding asynchronous I/O request 🚫 like bestie that's not even a real pending request, what are you doing

⭐ SEE ALSO ⭐

aio_cancel(2), aio_read(2), aio_readv(2), aio_return(2), aio_suspend(2), aio_write(2), aio_writev(2), fsync(2), read(2), write(2), aio(4) β€” the whole friend group, go say hi πŸ«ΆπŸ’–

πŸ‘‘ STANDARDS πŸ‘‘

The aio_error() system call is expected to conform to the IEEE Std 1003.1 (β€œPOSIX.1”) standard πŸ“œβœ¨ periodt.

🧚 HISTORY 🧚

The aio_error() system call first appeared in FreeBSD 3.0 β€” a certified classic, an icon, a legend honestly 🌟

πŸ’ AUTHORS πŸ’

This manual page was written by Wes Peters <wes@softweyr.com> β€” thank you for your service king πŸ«‘πŸ’–


and that's the whole page bestie, no cap πŸ’… this was the Debian version, dated January 2, 2021, and you just read the AIO_ERROR(2) page from the System Calls Manual β€” go forth and check your async statuses responsibly πŸŒΈβœ¨πŸ“

πŸ“¦ where this page comes from