Syntax | #include <stdlib.h> char *ptsname(int fildes); |
Description
The ptsname()
function returns the name of the slave pseudoterminal that is assigned to
the master pseudoterminal. fildes is the file descriptor that references the master terminal. The name has the format
| ||
Return val. | Pointer to a string | |
if successful. The string contains the name of the slave terminal. | ||
Null pointer | if an error occurs. This can happen if fildes is not a valid file descriptor or if | |
Notes See also | The pointer points to a static data area that is overwritten every time
|