[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

ptsname Subroutine

Purpose

Returns the name of a pseudo-terminal device.

Library

Standard C Library (libc.a)

Syntax

#include <stdlib.h>


char *ptsname ( FileDescriptor)
int FileDescriptor

Description

The ptsname subroutine gets the path name of the slave pseudo-terminal associated with the master pseudo-terminal device defined by the FileDescriptor parameter.

Parameters

FileDescriptor Specifies the file descriptor of the master pseudo-terminal device

Return Values

The ptsname subroutine returns a pointer to a string containing the null-terminated path name of the pseudo-terminal device associated with the file descriptor specified by the FileDescriptor parameter. A null pointer is returned and the errno global variable is set to indicate the error if the file descriptor does not describe a pseudo-terminal device in the /dev directory.

Files

/dev/* Terminal device special files.  

Related Information

The ttyname subroutine.

The Input and Output Handling Programmer's Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]