AIO_SUSPEND(2)
β¨ AIO_SUSPEND β¨ (section 2 of the manual, bestie)
okay so quick vibe check: this is a system call from the System Calls Manual, and it lives in the Standard C Library aka libc, so you link it with -lc. she's giving REALTIME energy and honestly? obsessed. π«Ά
πΈ NAME πΈ
aio_suspend β suspend until asynchronous I/O operations or timeout complete (REALTIME)
like... she literally just chills there until your async I/O does its thing. main character behavior fr fr π
π LIBRARY π
Standard C Library (libc, -lc)
β¨ SYNOPSIS β¨
#include <aio.h>
int
aio_suspend(const struct aiocb *const iocbs[], int niocb,
const struct timespec *timeout);
π DESCRIPTION π
so. the aio_suspend() system call suspends the calling process until at least one of the specified asynchronous I/O requests have completed, a signal is delivered, or the timeout has passed. three ways out, pick your fighter. π
the iocbs argument is an array of niocb pointers to asynchronous I/O requests. and here's the cute part: array members containing null pointers will be silently ignored. she's not gonna yell at you about it, she just moves on. no cap. π
if timeout is not a null pointer, it specifies a maximum interval to suspend. if timeout is a null pointer, the suspend blocks indefinitely β like, forever-forever, no take-backs. π and if you wanna effect a poll? make timeout point to a zero-value timespec structure. tiny little peek, no commitment. β¨
β RETURN VALUES β
if one or more of the specified asynchronous I/O requests have completed, aio_suspend() returns 0. slay. π
otherwise it returns -1 and sets errno to indicate the error, as enumerated below. not slay. π
π ERRORS π
the aio_suspend() system call will fail if:
[EAGAIN]β the timeout expired before any I/O requests completed. bestie the clock ran out and nobody showed up. π[EINVAL]β theiocbsargument contains more asynchronous I/O requests than thevfs.aio.max_aio_queue_per_procsysctl(8)variable, or at least one of the requests is not valid. too much going on, or one of them is just... not it. π ββοΈ[EINTR]β the suspend was interrupted by a signal. rude of that signal honestly. π€
π SEE ALSO π
the whole girl group. iykyk. π
π STANDARDS π
the aio_suspend() system call is expected to conform to the IEEE Std 1003.1 ("POSIX.1") standard. she's certified, she's official, she has paperwork. π
π¦ HISTORY π¦
the aio_suspend() system call first appeared in FreeBSD 3.0. vintage icon behavior. β
π AUTHORS π
This manual page was written by Wes Peters <wes@softweyr.com>. thank you wes, king. π«Ά
and that's the whole page, bestie!! this one shipped with Debian and the date on it is Oct 23, 2017 β so go forth, suspend responsibly, and remember: timeout = NULL means you're waiting forever, so know what you're signing up for. πβ¨ bye ily!! ππ¦πΈ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 1999 Softweyr LLC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms