Get the name of a slave pseudo-terminal device
#include <stdlib.h> char *ptsname_r( int fildes, char *buffer, size_t buflen );
- The file descriptor for the master pseudo-terminal.
- A pointer to a buffer where the function can store the name.
- The length of the buffer, in bytes.
Use the -l c option to qcc to link against this library. This library is usually included automatically.
This function is in libc.a, but not in libc.so (in order to save space).
The ptsname_r() function gets the name of the slave pseudo-terminal device associated with a master pseudo-terminal device. It's a reentrant version of ptsname() .
A pointer to a string containing the pathname of the corresponding slave device, or NULL if an error occurred (e.g. fildes is an invalid file descriptor, or the slave device name doesn't exist in the filesystem).
Last modified: 2013-12-23