Print this page
14249 pseudo-terminal nomenclature should reflect POSIX
Change-Id: Ib4a3cef899ff4c71b09cb0dc6878863c5e8357bc
@@ -1,49 +1,42 @@
PTSNAME(3C) Standard C Library Functions PTSNAME(3C)
NAME
- ptsname - get name of the slave pseudo-terminal device
+ ptsname - get the name of the subsidiary device of a pseudo-terminal
SYNOPSIS
#include <stdlib.h>
- char *ptsname(int fildes);
+ char *
+ ptsname(int fildes);
-
DESCRIPTION
- The ptsname() function 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 a non-
- negative integer.
+ The ptsname() function returns the name of the pseudo-terminal subsidiary
+ device associated with a pseudo-terminal manager device. The fildes
+ argument is a file descriptor returned from a successful open of the
+ pseudo-terminal manager device; e.g., by calling posix_openpt(3C) or by
+ performing an open(2) of the ptm(7D) device.
+ The ptsname() function returns a pointer to a string containing the null-
+ terminated path name of the subsidiary device. This string is of the
+ form /dev/pts/N, where N is a non-negative integer.
+
RETURN VALUES
- 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.
+ If successful, the ptsname() function returns a pointer to a string which
+ is the name of the pseudo-terminal subsidiary device. This value points
+ to a static data area that is overwritten by each call to ptsname().
-ATTRIBUTES
- See attributes(5) for descriptions of the following attributes:
+ Upon failure, ptsname() returns NULL. This could occur if fildes is an
+ invalid file descriptor or if the subsidiary device name does not exist
+ in the file system.
+INTERFACE STABILITY
+ Committed
+MT LEVEL
+ Safe
-
- +--------------------+-----------------+
- | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
- +--------------------+-----------------+
- |Interface Stability | Standard |
- +--------------------+-----------------+
- |MT-Level | Safe |
- +--------------------+-----------------+
-
SEE ALSO
- open(2), grantpt(3C), ttyname(3C), unlockpt(3C), attributes(5),
- standards(5)
+ open(2), grantpt(3C), posix_openpt(3C), ttyname(3C), unlockpt(3C),
+ attributes(5), standards(5), ptm(7D), pts(7D)
-
- STREAMS Programming Guide
-
- August 14, 2002 PTSNAME(3C)
+illumos February 5, 2022 illumos