ptsname_r()
QNX SDP8.0C Library ReferenceAPIDeveloper
Get the name of a slave pseudo-terminal device
Synopsis:
#include <stdlib.h>
int ptsname_r( int filedes,
char *buffer,
size_t buflen );
Arguments:
- filedes
- The file descriptor for the master pseudo-terminal.
- buffer
- A pointer to a buffer where the function can store the name.
- buflen
- The length of the buffer, in bytes.
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
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().
Returns:
- 0
- Success.
- -1
- An error occurred (errno is set).
Errors:
- EBADF
- The filedes argument isn't a valid file descriptor.
- ENOTTY
- The file associated with the filedes argument isn't a master pseudo-terminal device.
- EOVERFLOW
- The buffer is too small to hold the name.
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: