DCMD_CHR_ISATTY

Test to see if a file descriptor is associated with a terminal

Synopsis:

#include <sys/dcmd_chr.h>

#define DCMD_CHR_ISATTY   __DION(_DCMD_CHR, 24)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device.
dcmd DCMD_CHR_ISATTY
dev_data_ptr NULL
n_bytes 0
dev_info_ptr NULL

Description:

This command tests to see if a file descriptor is associated with a terminal, returning EOK if it is, or ENOTTY if it isn't.

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

Input:

None.

Output:

None.

Errors:

The devctl() function can return the following, in addition to the error codes listed in its entry in the C Library Reference:

ENOTTY
The file descriptor isn't associated with a terminal.

See also:

devctl(), isatty() in the QNX Neutrino C Library Reference