ptsname()

Get the name of a slave pseudo-terminal device

Synopsis:

#include <stdlib.h>

char *ptsname( int fildes );

Arguments:

fildes
The file descriptor for the master pseudo-terminal.

Library:

libc

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).

Description:

The ptsname() function gets the name of the slave pseudo-terminal device associated with a master pseudo-terminal device.

The ptsname_r() function is a BlackBerry 10 OS function that's a reentrant version of ptsname().

Returns:

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).

Classification:

POSIX 1003.1 XSI

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread No

Last modified: 2013-12-23

comments powered by Disqus