io_dontwantwrite(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… NAME

io_dontwantwrite β€” the lil function that says "bestie, not right now" to a descriptor πŸ’–

Basically: signal that you do not want to write to a descriptor. That's the whole vibe. No cap.


✨ SYNTAX

#include <libowfat/io.h>

void io_dontwantwrite(int64 fd);

Yep, that's it. One arg, one job. Iconic behavior honestly. πŸ‘‘


πŸ¦‹ DESCRIPTION

Okay so picture this: you got a descriptor, and you're just... not feeling it. Not today. io_dontwantwrite is how you tell the next io_wait() that you don't want to write to this descriptor for now. Like putting your phone on Do Not Disturb but for file descriptors. 🫢

Changed your mind? Totally valid, we love a plot twist. Just call io_wantwrite() again and you're back in business. πŸ’…

⚠️ But listen, there's a prerequisite, and it's giving "read the syllabus" energy: you have to have called io_fd on the descriptor first. The good news is io_pipe and io_socketpair do that for you, so if you came in through one of those doors, you're already slaying. ✨

And a real talk moment about what actually works 🌈: waiting on descriptors only works for sockets, fifos and pipes. It may also work on devices and TTYs, but that's platform dependent β€” so do not rely on that. It's giving "works on my machine," and we do not build on that. πŸ’€


🌸 SEE ALSO

Your group chat of related functions, all mutuals, all iconic:


And that's the whole page, bestie πŸŽ€ this was io_dontwantwrite(3) from the Library Functions Manual β€” no date and no version printed on it, so I can't tell you when it was born or what it's wearing, only that it's serving exactly as written. Go forth and don't write. πŸ’œ