io_block(3)
π io_block β bestie edition
okay so this is the manual page for io_block, a lil function from the Library Functions Manual that does exactly one thing and does it flawlessly: it flips a file descriptor back into blocking mode. that's it. that's the whole vibe. β¨
πΈ NAME πΈ
io_block β switch to blocking I/O π«Ά
like. the name literally tells you. it blocks. it's giving "what it says on the tin."
β¨ SYNTAX β¨
#include <libowfat/io.h>
void io_block(int64 fd);
yes bestie, that's int64 for the fd. no, we're not discussing it. it's iconic, it ate, moving on. π
π DESCRIPTION π
so io_block takes your UNIX descriptor fd and puts it into ``blocking mode.'' periodt. that's the whole job. no side quests.
now here's the tea you actually need to know β β file descriptors are normally in blocking mode already. like, that's the default, that's their natural state, that's their main character energy. except when they come from accept() or io_accept() and the listening socket was sitting in non-blocking mode. then your new fd inherited the non-blocking curse π and it's out here reading like it's got somewhere better to be.
so if you've got one of those chaotic little non-blocking descriptors and you want it to just. wait. like a normal well-behaved fd. that's the moment. that's when you call io_block. π¦
lowkey important: if your fd is already blocking, calling this is just... a vibe check. nothing dramatic happens. the manpage does not promise you anything extra, and neither do I. π
π SEE ALSO π
io_nonblock(3)β the flip side, the opposite queen, the one who does the exact reverse. ifio_blockis putting the phone down and waiting,io_nonblockis the one who can't sit still. check her out. π
and that's the whole page bestie!! π no cap, that's every single detail β the #include <libowfat/io.h>, the void io_block(int64 fd);, the blocking mode, the accept() / io_accept() / listening-socket situation, and the io_nonblock(3) link. nothing dropped, nothing invented. π―
this lil beauty came out of the Library Functions Manual and lives under io_block(3) β same name up top, same name at the bottom, symmetrical, balanced, absolutely serving. β go forth and block, 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