FIONREAD

Determine the number of characters waiting to be read

Synopsis:

#include <sys/ioctl.h>

#define FIONREAD        _IOR('f', 127, int)

Arguments to ioctl():

Argument Value
fd A file descriptor that you obtained by opening the device
request FIONREAD
Additional argument A pointer to an int

Description:

This command determine the number of characters waiting to be read. It's also implemented as the DCMD_CHR_ISCHARS devctl() command.

Note: This command is for internal use, and you shouldn't use it directly. Instead use the tcischars() cover function.

Input:

None.

Output:

The number of characters.

See also:

DCMD_CHR_ISCHARS, TIOCOUTQ

ioctl() in the QNX Neutrino C Library Reference