Go to the first, previous, next, last section, table of contents.


ttyname

Syntax

#include <unistd.h>

char *ttyname(int file);

Description

Gives the name of the terminal associated with file.

Return Value

Returns "con" if file is a device, else NULL.

Portability

not ANSI, POSIX

Example

char *tty = ttyname(0);


Go to the first, previous, next, last section, table of contents.