Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

15.1.82. isatty()

Prototype

int isatty(int fd)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

See description.

Available from ISR

No.

Include

<unistd.h>

Description

The isatty() function determines whether the device associated with the open file descriptor fd is a terminal device. This implementation uses the driver’s fstat() function to determine its reply.

Calls to isatty() are thread-safe only if the implementation of fstat() provided by the driver that is manipulated is thread-safe.

Return

The return value is 1 if the device is a character device, and zero otherwise. If an error occurs, errno is set to indicate the cause.