Nios® V Processor Software Developer Handbook

ID 743810
Date 5/26/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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