HPlogo MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4  POSIX/iX Library Function Descriptions

ttyname

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Determines terminal device name.

Syntax

   #include <unistd.h>

   char *ttyname(int fildes);

Parameters

fildes

An open file descriptor.

Return Values

The ttyname() function returns a NULL pointer if filedes is not a valid file descriptor associated with a terminal or if the pathname cannot be determined.

Description

The ttyname function returns a pointer to a string containing a null-terminated pathname of the terminal associated with file descriptor fildes.

Implementation Considerations

None.

Errors

If an error occurs, errno is set to the following value:

EBADFCAUSE The fildes parameter is not a valid open file descriptor.
 ACTION Check to see if fildes has been altered or not initialized.

See Also

ctermid(), isatty(), POSIX.1

Feedback to webmaster