Nios® V Processor Software Developer Handbook

ID 743810
Date 10/12/2024
Public
Document Table of Contents

16.1.1.76. 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.