ndelay_off(3)
π ndelay_off(3) β the blocking-mode button, bestie π
Library Functions Manual β¨ yes we are literally in the library functions section, this is a libowfat moment, iykyk.
π NAME π
ndelay_off β put a file descriptor in blocking mode πβ³
β¨ SYNTAX β¨
okay so first you gotta invite the header in, no cap:
#include <libowfat/ndelay.h>
extern int ndelay_off(int fd);
that's it. that's the whole vibe. she's a function, she takes an int fd, she gives you back an int. π
π¦ DESCRIPTION π¦
so ndelay_off does the thing where it puts a file descriptor into blocking mode. like, that's her whole job, that's her main character energy. π
and bestie, what does blocking actually mean? it means when you're reading from and writing to blocking network sockets, FIFOs or device files, the call will possibly not return immediately β it'll just sit there and wait on more input or buffer space for output. she's patient. she's not in a rush. she's giving "i'll get back to you when i feel like it" energy and honestly? iconic. π
not me just sitting in a syscall waiting for data like it's a situationship π
and if something goes wrong? if an error occurred, ndelay_off will return nonzero and set errno accordingly. so like, always check your return value, bestie, errno is literally telling you what happened. fr fr. π
π SEE ALSO π
go read these next, they're in the group chat too:
and that's the whole page, periodt β¨
this lil cutie came from the Library Functions Manual, and the page signs itself ndelay_off(3) at the bottom β no date stamp on this one, so we're just gonna vibe with it as-is. stay blocking (when you want to), bestie π«ΆπΈπ
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms