io_wantread(3)
π io_wantread β the "hey bestie, I wanna read from this fd" signal π
okay so this is io_wantread(3) from the Library Functions Manual, and honestly? she's a whole mood. let's get into it π¦
β¨ NAME β¨
io_wantread β signal that you want to read from a descriptor π
πΈ SYNTAX πΈ
#include <libowfat/io.h>
void io_wantread(int64 fd);
π DESCRIPTION π
so basically io_wantread is you telling the next io_wait() that you want to read from this descriptor. that's it. that's the whole vibe. it's giving "hey, keep an eye on this one for me" π«Ά
changed your mind? no worries babe, just call io_dontwantread() again. we love a flexible queen π
the next time you call io_wait(), it will look whether this descriptor becomes readable, too. and then you can use io_canread() to check whether the descriptor has actually become readable. check the vibes, confirm the vibes β¨
β οΈ okay important, no cap: you have to have calledio_fdon the descriptor first (io_pipeandio_socketpairdo this for you, they're the helpful besties who handle it π§).
and listen β waiting on descriptors only works for sockets, fifos and pipes. it may also work on devices and TTYs, but that's platform dependent, so you should not rely on that. fr fr, don't build your whole personality on it π
π SEE ALSO π
and that's the tea, bestie β this page lives in io_wantread(3) land, so go forth and read from those descriptors responsibly πβ¨
π¦ 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