---
name: "io_wantread"
section: "3"
platform: "linux"
package: "libowfat-dev"
version: "0.32-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/io_wantread"
---

# io\_wantread(3)

signal that you want to read from a descriptor

## NAME

io\_wantread - signal that you want to read from a descriptor

## SYNTAX

**#include \<libowfat/io.h\>**

void **io\_wantread**(int64 fd);

## DESCRIPTION

io\_wantread tells the next io\_wait() that you want to read from this descriptor.  Call io\_dontwantread() again if you change your mind.

The next time you call io\_wait(), it will look whether this descriptor becomes readable, too.  You can then use io\_canread() to check whether the descriptor has become readable.

You have to have called io\_fd on the descriptor first (io\_pipe and io\_socketpair do this for you).  Waiting on descriptors only works for sockets, fifos and pipes.  It may also work on devices and TTYs, but that is platform dependent -- you should not rely on that.

## SEE ALSO

[io\_wait(3)](/io_wait/3.md), [io\_canread(3)](/io_canread/3.md), [io\_wantread(3)](/io_wantread/3.md), [io\_fd(3)](/io_fd/3.md)
