Manpage of ISATTY

ISATTY

Section: Linux Programmer's Manual (3)
Updated: 2015-08-08
Index
 

NAME

isatty - test whether a file descriptor refers to a terminal  

SYNOPSIS

#include <unistd.h>int isatty(int fd);
 

DESCRIPTION

The isatty() function tests whether fdis an open file descriptor referring to a terminal.  

RETURN VALUE

isatty() returns 1 if fdis an open file descriptor referring to a terminal; otherwise 0 is returned, and errnois set to indicate the error.  

ERRORS

EBADF
fdis not a valid file descriptor.
EINVAL
fdrefers to a file other than a terminal. POSIX.1 specifies the error ENOTTYfor this case.
 

ATTRIBUTES

For an explanation of the terms used in this section, see attributes(7).
InterfaceAttributeValue
isatty() Thread safetyMT-Safe
 

CONFORMING TO

POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.  

SEE ALSO

fstat(2), ttyname(3)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
ATTRIBUTES
CONFORMING TO
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 16:30:16 GMT, December 12, 2016 Click Here!