Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ptsname(3C) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open(2)

grantpt(3C)

ttyname(3C)

unlockpt(3C)



PTSNAME(3C-SVR4)    RISC/os Reference Manual     PTSNAME(3C-SVR4)



NAME
     ptsname - get name of the slave pseudo-terminal device

SYNOPSIS
     #include <stdio.h>

     char *ptsname(int fildes);

DESCRIPTION
     The function ptsname() returns the name of the slave
     pseudo-terminal device associated with a master pseudo-
     terminal device.  fildes is a file descriptor returned from
     a successful open of the master device.  ptsname() returns a
     pointer to a string containing the null-terminated path name
     of the slave device of the form /dev/pts/N, where N is an
     integer between 0 and 255.

RETURN VALUE
     Upon successful completion, the function ptsname() returns a
     pointer to a string which is the name of the pseudo-terminal
     slave device.  This value points to a static data area that
     is overwritten by each call to ptsname().  Upon failure,
     ptsname() returns NULL. This could occur if fildes is an
     invalid file descriptor or if the slave device name does not
     exist in the file system.

SEE ALSO
     open(2), grantpt(3C), ttyname(3C),
     unlockpt(3C).
     STREAMS Programmer's Guide.

























                        Printed 11/19/92                   Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026