svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
ptsname(3c)
ptsname(3C) Standard C Library Functions ptsname(3C)
NAME
ptsname - get name of the subsidiary pseudo-terminal device
SYNOPSIS
#include <stdlib.h>
char *ptsname(int fildes);
DESCRIPTION
The ptsname() function returns the name of the subsidiary pseudo-termi‐
nal device associated with a manager pseudo-terminal device. fildes is
a file descriptor returned from a successful open of the manager de‐
vice. ptsname() returns a pointer to a string containing the null-ter‐
minated path name of the subsidiary device 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 subsidiary device.
This value points to a static data area that is overwritten by each
call to ptsname(). The returned pointer and the string content might
also be invalidated if the calling thread is terminated. 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.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe _ Standard‐
See standards(7).
SEE ALSO
open(2), grantpt(3C), openpty(3C), posix_openpt(3C), ttyname(3C),
unlockpt(3C), attributes(7), standards(7)
STREAMS Programming Guide
HISTORY
The ptsname() function was added in Solaris 2.0.
Oracle Solaris 11.4 27 Aug 2025 ptsname(3C)